commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r652927 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java
Date Fri, 02 May 2008 22:08:22 GMT
Author: mbenson
Date: Fri May  2 15:08:21 2008
New Revision: 652927

URL: http://svn.apache.org/viewvc?rev=652927&view=rev
Log:
avoid possible race condition

Modified:
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java?rev=652927&r1=652926&r2=652927&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java
(original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java
Fri May  2 15:08:21 2008
@@ -364,7 +364,7 @@
      * Get the root node.
      * @return Object value of this pointer's root (top parent).
      */
-    public Object getRootNode() {
+    public synchronized Object getRootNode() {
         if (rootNode == null) {
             rootNode = parent == null ? getImmediateNode() : parent.getRootNode();
         }



Mime
View raw message