activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1231081 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
Date Fri, 13 Jan 2012 14:10:11 GMT
Author: tabish
Date: Fri Jan 13 14:10:11 2012
New Revision: 1231081

URL: http://svn.apache.org/viewvc?rev=1231081&view=rev
Log:
fix for NPE: https://issues.apache.org/jira/browse/AMQ-3649

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java?rev=1231081&r1=1231080&r2=1231081&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
Fri Jan 13 14:10:11 2012
@@ -51,7 +51,8 @@ import org.slf4j.LoggerFactory;
         if (ignoreNoSpaceErrors) {
             Throwable cause = exception;
             while (cause != null && cause instanceof IOException) {
-                if (cause.getMessage().contains(noSpaceMessage)) {
+                String message = cause.getMessage();
+                if (message != null && message.contains(noSpaceMessage)) {
                     LOG.info("Ignoring no space left exception, " + exception, exception);
                     return;
                 }
@@ -62,7 +63,8 @@ import org.slf4j.LoggerFactory;
         if (ignoreSQLExceptions) {
             Throwable cause = exception;
             while (cause != null) {
-                if (cause instanceof SQLException && cause.getMessage().contains(sqlExceptionMessage))
{
+                String message = cause.getMessage();
+                if (cause instanceof SQLException && message.contains(sqlExceptionMessage))
{
                     LOG.info("Ignoring SQLException, " + exception, cause);
                     return;
                 }



Mime
View raw message