From 7e5107ef3e2bb0d7c31d3050fb8ba6cc1601ef1a Mon Sep 17 00:00:00 2001
From: Glenn Matthys <glenn@webmind.be>
Date: Sun, 17 Jan 2016 17:15:38 -0500
Subject: [PATCH] Describe how DH key bitlength can be influenced

---
 src/main/java/com/gitblit/utils/JsonUtils.java |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/gitblit/utils/JsonUtils.java b/src/main/java/com/gitblit/utils/JsonUtils.java
index be7148c..f389776 100644
--- a/src/main/java/com/gitblit/utils/JsonUtils.java
+++ b/src/main/java/com/gitblit/utils/JsonUtils.java
@@ -46,6 +46,7 @@
 import com.google.gson.JsonDeserializationContext;
 import com.google.gson.JsonDeserializer;
 import com.google.gson.JsonElement;
+import com.google.gson.JsonParseException;
 import com.google.gson.JsonPrimitive;
 import com.google.gson.JsonSerializationContext;
 import com.google.gson.JsonSerializer;
@@ -79,23 +80,29 @@
 
 	/**
 	 * Convert a json string to an object of the specified type.
-	 *
+	 * 
 	 * @param json
 	 * @param clazz
-	 * @return an object
+	 * @return the deserialized object
+	 * @throws JsonParseException
+	 * @throws JsonSyntaxException
 	 */
-	public static <X> X fromJsonString(String json, Class<X> clazz) {
+	public static <X> X fromJsonString(String json, Class<X> clazz) throws JsonParseException,
+			JsonSyntaxException {
 		return gson().fromJson(json, clazz);
 	}
 
 	/**
 	 * Convert a json string to an object of the specified type.
-	 *
+	 * 
 	 * @param json
-	 * @param clazz
-	 * @return an object
+	 * @param type
+	 * @return the deserialized object
+	 * @throws JsonParseException
+	 * @throws JsonSyntaxException
 	 */
-	public static <X> X fromJsonString(String json, Type type) {
+	public static <X> X fromJsonString(String json, Type type) throws JsonParseException,
+			JsonSyntaxException {
 		return gson().fromJson(json, type);
 	}
 

--
Gitblit v1.9.1