abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r472152 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
Date Tue, 07 Nov 2006 16:30:34 GMT
Author: rooneg
Date: Tue Nov  7 08:30:33 2006
New Revision: 472152

URL: http://svn.apache.org/viewvc?view=rev&rev=472152
Log:
Fix ABDERA-22, calling the Parser#parse(Reader r) method without passing in
a base argument always throws a NullPointerException.

[ in parser/src/main/java/org/apache/abdera/parser/stax ]
* FOMParser.java
  (parse): Don't pass a null base into IRI's constructor, instead recognize
   it and pass a null base IRI into getDocument.

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java?view=diff&rev=472152&r1=472151&r2=472152
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
Tue Nov  7 08:30:33 2006
@@ -128,7 +128,7 @@
       FOMFactory factory = getFomFactory(options);
       XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(in);
       FOMBuilder builder = new FOMBuilder(factory, xmlreader, options);
-      document = getDocument(builder, new IRI(base));
+      document = getDocument(builder, base != null ? new IRI(base) : null);
       setCharset(options, xmlreader.getCharacterEncodingScheme(), document);
     } catch (Exception e) {
       if (!(e instanceof ParseException))



Mime
View raw message