abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1435809 - /abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
Date Sun, 20 Jan 2013 09:45:50 GMT
Author: veithen
Date: Sun Jan 20 09:45:49 2013
New Revision: 1435809

URL: http://svn.apache.org/viewvc?rev=1435809&view=rev
Log:
Some code simplifications.

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

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java?rev=1435809&r1=1435808&r2=1435809&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java Sun
Jan 20 09:45:49 2013
@@ -148,40 +148,16 @@ public class FOMParser extends AbstractP
         }
     }
 
-    private static XMLInputFactory getXMLInputFactory() {
-        return StAXUtils.getXMLInputFactory(ABDERA_PARSER_CONFIGURATION);
-    }
-
-    private static void releaseXMLInputFactory(XMLInputFactory inputFactory) {
-        StAXUtils.releaseXMLInputFactory(inputFactory);
-    }
-
     public static XMLStreamReader createXMLStreamReader(InputStream in, String encoding)
throws XMLStreamException {
-        XMLInputFactory inputFactory = getXMLInputFactory();
-        try {
-            return inputFactory.createXMLStreamReader(in, encoding);
-        } finally {
-            releaseXMLInputFactory(inputFactory);
-        }
+        return StAXUtils.createXMLStreamReader(ABDERA_PARSER_CONFIGURATION, in, encoding);
     }
 
     public static XMLStreamReader createXMLStreamReader(InputStream in) throws XMLStreamException
{
-        XMLInputFactory inputFactory = getXMLInputFactory();
-        try {
-            return inputFactory.createXMLStreamReader(in);
-        } finally {
-            releaseXMLInputFactory(inputFactory);
-        }
+        return StAXUtils.createXMLStreamReader(ABDERA_PARSER_CONFIGURATION, in);
     }
 
     private XMLStreamReader createXMLStreamReader(Reader in) throws XMLStreamException {
-        XMLInputFactory inputFactory = getXMLInputFactory();
-        try {
-            XMLStreamReader reader = inputFactory.createXMLStreamReader(in);
-            return reader;
-        } finally {
-            releaseXMLInputFactory(inputFactory);
-        }
+        return StAXUtils.createXMLStreamReader(ABDERA_PARSER_CONFIGURATION, in);
     }
 
     public <T extends Element> Document<T> parse(XMLStreamReader reader, String
base, ParserOptions options)



Mime
View raw message