Skip to content

Commit 7e1bab9

Browse files
author
jack
committed
jgraphx
1 parent 6118181 commit 7e1bab9

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
<groupId>com.github.jgraph</groupId>
6262
<artifactId>jgraphx</artifactId>
6363
<version>v3.4.0.0</version>
64+
<scope>system</scope>
65+
<systemPath>${project.basedir}/src/main/resources/lib/jgraphx-v3.4.0.0.jar</systemPath>
6466
</dependency>
6567
<dependency>
6668
<groupId>org.apache.commons</groupId>

src/main/java/com/mxgraph/online/OpenServlet.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public static Map<String, String> decodeCompressedText(InputStream stream) {
9494
throw new RuntimeException("PNGImageDecoder0");
9595
}
9696
} catch (Exception e) {
97-
e.printStackTrace();
9897
throw new RuntimeException("PNGImageDecoder1");
9998
}
10099

@@ -120,14 +119,14 @@ public static Map<String, String> decodeCompressedText(InputStream stream) {
120119
String value = URLDecoder.decode(Utils.inflate(bytes), Utils.CHARSET_FOR_URL_ENCODING);
121120
result.put(key, value);
122121
} catch (Exception e) {
123-
log.error("", e);
122+
log.info("", e);
124123
}
125124
// No need to parse the rest of the PNG
126125
return result;
127126
}
128127
}
129128
} catch (Exception e) {
130-
e.printStackTrace();
129+
log.info("", e);
131130
}
132131

133132
return null;
@@ -137,10 +136,8 @@ public static Map<String, String> decodeCompressedText(InputStream stream) {
137136
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
138137
*/
139138
@Override
140-
protected void doPost(HttpServletRequest request,
141-
HttpServletResponse response) throws ServletException, IOException {
139+
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
142140
PrintWriter writer = response.getWriter();
143-
144141
try {
145142
if (request.getContentLength() < Constants.MAX_REQUEST_SIZE) {
146143
String filename = "";
@@ -235,10 +232,8 @@ protected void doPost(HttpServletRequest request,
235232
writeScript(writer,
236233
"window.parent.alert('Out of memory');");
237234
} catch (Exception e) {
238-
log.error("", e);
239235
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
240-
writeScript(writer,
241-
"window.parent.alert(JSON.stringify(window.parent.mxResources.get('invalidOrMissingFile')));");
236+
writeScript(writer, "window.parent.alert(JSON.stringify(window.parent.mxResources.get('invalidOrMissingFile')));");
242237
}
243238

244239
writer.flush();
1.28 MB
Binary file not shown.

0 commit comments

Comments
 (0)