openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r790151 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
Date Wed, 01 Jul 2009 12:53:40 GMT
Author: jrbauer
Date: Wed Jul  1 12:53:39 2009
New Revision: 790151

URL: http://svn.apache.org/viewvc?rev=790151&view=rev
Log:
OPENJPA-1135 Correct access type related issue with multi-level parsing

Modified:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java?rev=790151&r1=790150&r2=790151&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
Wed Jul  1 12:53:39 2009
@@ -106,6 +106,22 @@
     private int _depth = -1;
     private int _ignore = Integer.MAX_VALUE;
 
+    private boolean _parsing = false;
+
+    /*
+     * Whether the parser is currently parsing.
+     */
+    public boolean isParsing() {
+        return _parsing;
+    }
+
+    /*
+     * Whether the parser is currently parsing.
+     */
+    public void setParsing(boolean parsing) {
+        this._parsing = parsing;
+    }
+
     /**
      * Whether to parse element text.
      */
@@ -348,6 +364,7 @@
 
         // parse the metadata with a SAX parser
         try {
+            setParsing(true);
             _sourceName = sourceName;
             SAXParser parser = XMLFactory.getSAXParser(validating, true);
             Object schema = null;
@@ -525,7 +542,6 @@
         if (_log != null && _log.isTraceEnabled())
             _log.trace(_loc.get("end-parse", getSourceName()));
         _results = new ArrayList(_curResults);
-        clearDeferredMetaData();
     }
 
     /**
@@ -542,6 +558,8 @@
         _ignore = Integer.MAX_VALUE;
         if (_comments != null)
             _comments.clear();
+        clearDeferredMetaData();
+        setParsing(false);
     }
 
     /**



Mime
View raw message