xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ce...@apache.org
Subject svn commit: r393943 - /xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java
Date Thu, 13 Apr 2006 21:18:45 GMT
Author: cezar
Date: Thu Apr 13 14:18:43 2006
New Revision: 393943

URL: http://svn.apache.org/viewcvs?rev=393943&view=rev
Log:
Fix enter/exit locale during reading from an xmlinputstream.


Modified:
    xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java

Modified: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java?rev=393943&r1=393942&r2=393943&view=diff
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java (original)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java Thu Apr 13 14:18:43
2006
@@ -281,6 +281,16 @@
         return _saveNamespacesFirst;
     }
 
+    protected void enterLocale()
+    {
+        _locale.enter();
+    }
+
+    protected void exitLocale()
+    {
+        _locale.exit();
+    }
+
     protected final boolean process ( )
     {
         assert _locale.entered();
@@ -2640,8 +2650,19 @@
 
         XMLEvent dequeue ( )
         {
-            if (_out == null && !process())
-                return null;
+            if (_out == null)
+            {
+                enterLocale();
+                try
+                {
+                    if(!process())
+                        return null;
+                }
+                finally
+                {
+                    exitLocale();
+                }
+            }
 
             if (_out == null)
                 return null;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org


Mime
View raw message