Repository: incubator-geode
Updated Branches:
  refs/heads/develop d0f9dc355 -> efd011750


GEODE-1524: Updating swagger annotations to 1.3.13
Removing of escape characters out of the return error messages. JSON documents
with "\" are invalid if not escaped.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/964ce837
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/964ce837
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/964ce837

Branch: refs/heads/develop
Commit: 964ce8379a2bed515fdd9f3d08b1e4d0beb4f39e
Parents: 8802404
Author: Udo Kohlmeyer <ukohlme...@pivotal.io>
Authored: Tue Sep 20 05:59:01 2016 +1000
Committer: Udo Kohlmeyer <ukohlme...@pivotal.io>
Committed: Tue Sep 20 05:59:01 2016 +1000

----------------------------------------------------------------------
 .../rest/internal/web/controllers/AbstractBaseController.java | 7 +++++--
 gradle/dependency-versions.properties                         | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/964ce837/geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/AbstractBaseController.java
----------------------------------------------------------------------
diff --git 
a/geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/AbstractBaseController.java
 
b/geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/AbstractBaseController.java
index 6869f0e..e94998b 100644
--- 
a/geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/AbstractBaseController.java
+++ 
b/geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/AbstractBaseController.java
@@ -199,7 +199,7 @@ public abstract class AbstractBaseController {
       
       final HttpHeaders headers = new HttpHeaders();
       headers.setLocation(toUri("queries", queryId));    
-      return new ResponseEntity<String>(queryResultAsJson, headers, 
HttpStatus.OK);
+      return new ResponseEntity<>(queryResultAsJson, headers, HttpStatus.OK);
     }else {
       throw new GemfireRestException("Server has encountered error while 
generating query result into restful format(JSON)!");
     }
@@ -645,7 +645,10 @@ public abstract class AbstractBaseController {
   protected String convertErrorAsJson(Throwable t) {
     StringWriter writer = new StringWriter();
     t.printStackTrace(new PrintWriter(writer));
-    return String.format("{\"message\" : \"%1$s\", \"stackTrace\" : 
\"%2$s\"}", t.getMessage(), writer.toString());
+    String returnString = writer.toString();
+    returnString = returnString.replace("\n"," ");
+    returnString = returnString.replace("\t"," ");
+    return String.format("{\"message\" : \"%1$s\", \"stackTrace\" : 
\"%2$s\"}", t.getMessage(), returnString);
   }
 
   protected Map<?,?> convertJsonToMap(final String jsonString) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/964ce837/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties 
b/gradle/dependency-versions.properties
index 0abe690..c6e99ad 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -99,7 +99,7 @@ spring-tx.version = 3.2.12.RELEASE
 springframework.version = 4.2.4.RELEASE
 stephenc-findbugs.version = 1.3.9-1
 spymemcached.version = 2.9.0
-swagger.version = 1.3.2
+swagger.version = 1.3.13
 swagger-springmvc.version = 0.8.2
 system-rules.version = 1.16.0
 tempus-fugit.version = 1.1

Reply via email to