Skip to content

Instantly share code, notes, and snippets.

@druminski
Created November 14, 2013 20:58
Show Gist options
  • Save druminski/7474203 to your computer and use it in GitHub Desktop.
Save druminski/7474203 to your computer and use it in GitHub Desktop.
This is a patch which fix a bug described here: https://java.net/jira/browse/JERSEY-2225 Thanks that patch MappableException's cause will not be logged, only WebApplicationExcaption's cause are logged. The patch moves logging of an exception cause to a code block which is invoked when the server is dealing with WebApplicationException
Index: core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java (revision 307ffdadf89e53c685ecf7bec04e8711e61d310e)
+++ core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java (revision )
@@ -452,11 +452,11 @@
if (waeResponse.hasEntity()) {
return waeResponse;
}
- }
- // Log cause of WebApplicationException.
- if (cause != null) {
- LOGGER.log(Level.WARNING, LocalizationMessages.WEB_APPLICATION_EXCEPTION_CAUSE(), cause);
+ // Log cause of WebApplicationException.
+ if (cause != null) {
+ LOGGER.log(Level.WARNING, LocalizationMessages.WEB_APPLICATION_EXCEPTION_CAUSE(), cause);
+ }
}
final long timestamp = tracingLogger.timestamp(ServerTraceEvent.EXCEPTION_MAPPING);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment