From a4b1e4c32927208e92ca9895fa780e18051d3932 Mon Sep 17 00:00:00 2001
From: Roberto Sánchez <roberto.sanchez@curisit.net>
Date: Thu, 18 Sep 2014 14:20:17 +0000
Subject: [PATCH] #0 feature - Fixed some SonarQube issues

---
 src/main/java/net/curisit/securis/utils/JsonUtils.java |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/main/java/net/curisit/securis/utils/JsonUtils.java b/src/main/java/net/curisit/securis/utils/JsonUtils.java
index c134c05..3ac49c3 100644
--- a/src/main/java/net/curisit/securis/utils/JsonUtils.java
+++ b/src/main/java/net/curisit/securis/utils/JsonUtils.java
@@ -22,7 +22,7 @@
  */
 public class JsonUtils {
 
-	private static final Logger log = LogManager.getLogger(JsonUtils.class);
+	private static final Logger LOG = LogManager.getLogger(JsonUtils.class);
 
 	final private static ObjectMapper MAPPER = new ObjectMapper();
 
@@ -58,12 +58,12 @@
 			}
 			return MAPPER.readValue(json, type);
 		} catch (JsonParseException e) {
-			log.error("Error parsing JSON string to obejct: {}", json, e);
+			LOG.error("Error parsing JSON string to obejct: {}", json, e);
 			if (json.length() > 60)
 				json = json.substring(0, 50) + "...";
 			throw new SeCurisException("Error parsing JSON string to object: " + json, e);
 		} catch (IOException e) {
-			log.error("Error parsing JSON string to object: {}", json, e);
+			LOG.error("Error parsing JSON string to object: {}", json, e);
 			if (json.length() > 60)
 				json = json.substring(0, 50) + "...";
 			throw new SeCurisException("Error parsing JSON string to object: " + json, e);
@@ -85,10 +85,10 @@
 			}
 			return MAPPER.writeValueAsString(obj);
 		} catch (JsonProcessingException e) {
-			log.error("Error formating JSON from object: {}", obj, e);
+			LOG.error("Error formating JSON from object: {}", obj, e);
 			throw new SeCurisException("Error formating JSON from object: " + obj, e);
 		} catch (IOException e) {
-			log.error("Error formating JSON from object: {}", obj, e);
+			LOG.error("Error formating JSON from object: {}", obj, e);
 			throw new SeCurisException("Error formating JSON from object: " + obj, e);
 		}
 	}
@@ -111,10 +111,10 @@
 			MAPPER.disable(SerializationConfig.Feature.INDENT_OUTPUT);
 			return json;
 		} catch (JsonProcessingException e) {
-			log.error("Error formating JSON from object: {}", obj, e);
+			LOG.error("Error formating JSON from object: {}", obj, e);
 			throw new SeCurisException("Error formating JSON from object: " + obj, e);
 		} catch (IOException e) {
-			log.error("Error formating JSON from object: {}", obj, e);
+			LOG.error("Error formating JSON from object: {}", obj, e);
 			throw new SeCurisException("Error formating JSON from object: " + obj, e);
 		}
 	}
@@ -137,10 +137,10 @@
 			}
 			return MAPPER.readValue(json, Map.class);
 		} catch (JsonParseException e) {
-			log.error("Error parsing JSON string to map: {}", json, e);
+			LOG.error("Error parsing JSON string to map: {}", json, e);
 			throw e;
 		} catch (IOException e) {
-			log.error("Error parsing JSON string to map: {}", json, e);
+			LOG.error("Error parsing JSON string to map: {}", json, e);
 		}
 		return null;
 	}
@@ -160,9 +160,9 @@
 			}
 			return MAPPER.writeValueAsString(map);
 		} catch (JsonProcessingException e) {
-			log.error("Error formating JSON from map: {}", map, e);
+			LOG.error("Error formating JSON from map: {}", map, e);
 		} catch (IOException e) {
-			log.error("Error formating JSON from map: {}", map, e);
+			LOG.error("Error formating JSON from map: {}", map, e);
 		}
 
 		return null;
@@ -182,10 +182,10 @@
 		try {
 			return MAPPER.readValue(json, List.class);
 		} catch (JsonParseException e) {
-			log.error("Error converting JSON string to object {}", json, e);
+			LOG.error("Error converting JSON string to object {}", json, e);
 			throw new SeCurisException("Error converting JSON to object", e);
 		} catch (IOException e) {
-			log.error("Error converting JSON string to object {}", json, e);
+			LOG.error("Error converting JSON string to object {}", json, e);
 			throw new SeCurisException("Error converting JSON to object", e);
 		}
 	}
@@ -206,7 +206,7 @@
 		} catch (JsonParseException e) {
 			throw new SeCurisException("Error converting JSON to object", e);
 		} catch (IOException e) {
-			log.error("Error converting JSON to object", e);
+			LOG.error("Error converting JSON to object", e);
 			throw new SeCurisException("Error converting JSON to object", e);
 		}
 	}

--
Gitblit v1.3.2