abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r417657 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
Date Wed, 28 Jun 2006 03:22:44 GMT
Author: jmsnell
Date: Tue Jun 27 20:22:43 2006
New Revision: 417657

URL: http://svn.apache.org/viewvc?rev=417657&view=rev
Log:
>From Garrett Rooney...

Check for null input streams in the parse() method.

[ in parser/src/main/java/org/apache/abdera/parser/stax ]

* FOMParser.java
 (parse): Throw an IllegalArgumentException if we are passed a null
  InputStream or Reader.

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?rev=417657&r1=417656&r2=417657&view=diff
==============================================================================
--- 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 Jun 27 20:22:43 2006
@@ -65,6 +65,10 @@
     ParserOptions options)
       throws ParseException {
     Document<T> document = null;
+
+    if (in == null)
+      throw new IllegalArgumentException("InputStream must not be null");
+
     try {
       FOMFactory factory = getFomFactory(options);
       FOMBuilder builder = new FOMBuilder(factory, in, options);
@@ -83,6 +87,10 @@
     ParserOptions options) 
       throws ParseException {
     Document<T> document = null;
+
+    if (in == null)
+      throw new IllegalArgumentException("Reader must not be null");
+
     try {
       FOMFactory factory = getFomFactory(options);
       XMLStreamReader xmlreader = 



Mime
View raw message