You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2021/03/28 01:17:56 UTC

svn commit: r1888122 - /xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java

Author: fanningpj
Date: Sun Mar 28 01:17:55 2021
New Revision: 1888122

URL: http://svn.apache.org/viewvc?rev=1888122&view=rev
Log:
[XMLBeans-559] Race condition in SchemaIdentityConstraintImpl. Thanks to Thorsten Goetzke

Modified:
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java?rev=1888122&r1=1888121&r2=1888122&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java Sun Mar 28 01:17:55 2021
@@ -122,10 +122,10 @@ public class SchemaIdentityConstraintImp
         // TODO: Need the namespace map - requires store support
         _selectorPath = XPath.compileXPath(_selector, _nsMap);
 
-        _fieldPaths = new XPath[_fields.length];
-        for (int i = 0; i < _fieldPaths.length; i++) {
-            _fieldPaths[i] = XPath.compileXPath(_fields[i], _nsMap);
-        }
+        XPath[] fieldPaths = new XPath[_fields.length];
+        for (int i = 0 ; i < fieldPaths.length ; i++)
+            fieldPaths[i] = XPath.compileXPath(_fields[i], _nsMap);
+        _fieldPaths = fieldPaths;
     }
 
     public void setReferencedKey(SchemaIdentityConstraint.Ref key) {



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