servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r406620 - /incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
Date Mon, 15 May 2006 11:47:51 GMT
Author: gnodet
Date: Mon May 15 04:47:46 2006
New Revision: 406620

URL: http://svn.apache.org/viewcvs?rev=406620&view=rev
Log:
Fix possible NPE

Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java?rev=406620&r1=406619&r2=406620&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
Mon May 15 04:47:46 2006
@@ -109,8 +109,12 @@
                 streamReader.next();
             }
         } catch (XMLStreamException e) {
-            throw new SAXParseException(e.getMessage(), null, null, e.getLocation().getLineNumber(),
e.getLocation()
-                    .getColumnNumber(), e);
+            if (e.getLocation() != null) {
+                throw new SAXParseException(e.getMessage(), null, null, e.getLocation().getLineNumber(),
e.getLocation()
+                        .getColumnNumber(), e);
+            } else {
+                throw new SAXParseException(e.getMessage(), null, null, -1, -1, e);
+            }
         }
     }
 



Mime
View raw message