geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1393337 - /geronimo/xbean/trunk/xbean-naming/src/main/java/org/apache/xbean/naming/context/ContextUtil.java
Date Wed, 03 Oct 2012 08:20:03 GMT
Author: gnodet
Date: Wed Oct  3 08:20:03 2012
New Revision: 1393337

URL: http://svn.apache.org/viewvc?rev=1393337&view=rev
Log:
[XBEAN-119] ContextUtil#isRelative() always returns false

Modified:
    geronimo/xbean/trunk/xbean-naming/src/main/java/org/apache/xbean/naming/context/ContextUtil.java

Modified: geronimo/xbean/trunk/xbean-naming/src/main/java/org/apache/xbean/naming/context/ContextUtil.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-naming/src/main/java/org/apache/xbean/naming/context/ContextUtil.java?rev=1393337&r1=1393336&r2=1393337&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-naming/src/main/java/org/apache/xbean/naming/context/ContextUtil.java
(original)
+++ geronimo/xbean/trunk/xbean-naming/src/main/java/org/apache/xbean/naming/context/ContextUtil.java
Wed Oct  3 08:20:03 2012
@@ -16,8 +16,11 @@
  */
 package org.apache.xbean.naming.context;
 
-import org.apache.xbean.naming.reference.SimpleReference;
-
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
 import javax.naming.Binding;
 import javax.naming.CompoundName;
 import javax.naming.Context;
@@ -28,12 +31,8 @@ import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.Reference;
 import javax.naming.spi.NamingManager;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
+
+import org.apache.xbean.naming.reference.SimpleReference;
 
 /**
  * @version $Rev$ $Date$
@@ -171,11 +170,17 @@ public final class ContextUtil {
     public static final class ReadOnlyBinding extends Binding {
         private final Object value;
         private final Context context;
+        private final boolean isRelative;
 
         public ReadOnlyBinding(String name, Object value, Context context) {
+            this(name, value, false, context);
+        }
+
+        public ReadOnlyBinding(String name, Object value, boolean isRelative, Context context)
{
             super(name, value);
             this.value = value;
             this.context = context;
+            this.isRelative = isRelative;
         }
 
         public void setName(String name) {
@@ -207,7 +212,7 @@ public final class ContextUtil {
         }
 
         public boolean isRelative() {
-            return false;
+            return isRelative;
         }
 
         public void setRelative(boolean r) {



Mime
View raw message