abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r473486 - in /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax: FOMParser.java FOMParserOptions.java
Date Fri, 10 Nov 2006 21:14:51 GMT
Author: jmsnell
Date: Fri Nov 10 13:14:50 2006
New Revision: 473486

URL: http://svn.apache.org/viewvc?view=rev&rev=473486
Log:
Fix for https://issues.apache.org/jira/browse/ABDERA-20

The problem is that FOMParserOptions was creating a new Factory instance rather than using
the default
instance.

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParserOptions.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=473486&r1=473485&r2=473486
==============================================================================
--- 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
Fri Nov 10 13:14:50 2006
@@ -141,7 +141,7 @@
   @Override
   public synchronized ParserOptions getDefaultParserOptions() {
     if (options == null)
-      options = new FOMParserOptions();
+      options = new FOMParserOptions(getFactory());
 
     // Make a copy of the options, so that changes to it don't result in
     // changes to the Parser's defaults.  Also, this allows us to remain

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParserOptions.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParserOptions.java?view=diff&rev=473486&r1=473485&r2=473486
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParserOptions.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParserOptions.java
Fri Nov 10 13:14:50 2006
@@ -24,8 +24,12 @@
 public class FOMParserOptions
   extends AbstractParserOptions {
 
+  public FOMParserOptions(Factory factory) {
+    this.factory = factory;
+  }
+  
   protected void initFactory() {
-    factory = new FOMFactory();
+    if (factory == null) factory = new FOMFactory();
   }
   
   protected void checkFactory(Factory factory) {



Mime
View raw message