* @param message the error message.
* @param exception the exception that occurred.
*/
- public static void handleErrorCondition(String message, Exception exception) {
+ public static void handleErrorCondition(String message, Throwable exception) {
log.error(1, message, exception);
handleErrorCondition(new InternalException(message, exception));
}
*
* @param exception the exception that occurred.
*/
- public static void handleErrorCondition(final Exception exception) {
+ public static void handleErrorCondition(final Throwable exception) {
try {
if (!(exception instanceof InternalException)) {
log.error(1, "Error occurred", exception);
// NOTE: Calling method logs the entire throwable, so log only message here
+
+ /*
+ * Detect and ignore bug 6826104 in Sun JRE.
+ */
+ if (t instanceof NullPointerException) {
+ StackTraceElement[] trace = t.getStackTrace();
+
+ if (trace.length > 3 &&
+ trace[0].getClassName().equals("sun.awt.X11.XWindowPeer") &&
+ trace[0].getMethodName().equals("restoreTransientFor") &&
+
+ trace[1].getClassName().equals("sun.awt.X11.XWindowPeer") &&
+ trace[1].getMethodName().equals("removeFromTransientFors") &&
+
+ trace[2].getClassName().equals("sun.awt.X11.XWindowPeer") &&
+ trace[2].getMethodName().equals("setModalBlocked")) {
+ log.warn("Ignoring Sun JRE bug (6826104): http://bugs.sun.com/view_bug.do?bug_id=6826104" + t);
+ return true;
+ }
+
+ }
+
+
/*
* Detect and ignore bug 6828938 in Sun JRE 1.6.0_14 - 1.6.0_16.
*/