commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1471597 - /commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
Date Wed, 24 Apr 2013 18:42:21 GMT
Author: sebb
Date: Wed Apr 24 18:42:21 2013
New Revision: 1471597

URL: http://svn.apache.org/r1471597
Log:
Avoid potential NPE

Modified:
    commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java

Modified: commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java?rev=1471597&r1=1471596&r2=1471597&view=diff
==============================================================================
--- commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
(original)
+++ commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
Wed Apr 24 18:42:21 2013
@@ -258,9 +258,13 @@ public class ChainListener implements Se
                 }
                 parser.parse(resourceURL);
             } catch (Exception e) {
+                String externalURL = "null";
+                if (resourceURL != null) {
+                    externalURL = resourceURL.toExternalForm();
+                }
                 throw new RuntimeException
                         ("Exception parsing chain config resource '"
-                                + resourceURL.toExternalForm() + "': "
+                                + externalURL + "': "
                                 + e.getMessage());
             }
         }



Mime
View raw message