commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r570184 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/VariablePointerFactory.java
Date Mon, 27 Aug 2007 17:05:53 GMT
Author: mbenson
Date: Mon Aug 27 10:05:52 2007
New Revision: 570184

URL: http://svn.apache.org/viewvc?rev=570184&view=rev
Log:
[JXPATH-101] Original context from VariableContextWrapper is not visible; from Sergey Vladimirov

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

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/VariablePointerFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/VariablePointerFactory.java?rev=570184&r1=570183&r2=570184&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/VariablePointerFactory.java
(original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/VariablePointerFactory.java
Mon Aug 27 10:05:52 2007
@@ -35,11 +35,20 @@
      * Node value wrapper to trigger a VariablePointerFactory.
      */
     public static class VariableContextWrapper {
-        final JXPathContext context;
+        private final JXPathContext context;
 
         private VariableContextWrapper(JXPathContext context) {
             this.context = context;
         }
+
+        /**
+         * Get the original (unwrapped) context.
+         * 
+         * @return JXPathContext.
+         */
+        public JXPathContext getContext() {
+            return context;
+        }
     }
 
     /**
@@ -60,7 +69,7 @@
     public NodePointer createNodePointer(QName name, Object object,
             Locale locale) {
         if (object instanceof VariableContextWrapper) {
-            JXPathContext varCtx = ((VariableContextWrapper) object).context;
+            JXPathContext varCtx = ((VariableContextWrapper) object).getContext();
             while (varCtx != null) {
                 Variables vars = varCtx.getVariables();
                 if (vars.isDeclaredVariable(name.toString())) {



Mime
View raw message