geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r451401 - /geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractContext.java
Date Fri, 29 Sep 2006 19:44:15 GMT
Author: dain
Date: Fri Sep 29 12:44:14 2006
New Revision: 451401

URL: http://svn.apache.org/viewvc?view=rev&rev=451401
Log:
Added support to removeNotEmptyContext from which is needed to remove nested contexts which
are not empty.

Modified:
    geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractContext.java

Modified: geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractContext.java?view=diff&rev=451401&r1=451400&r2=451401
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractContext.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractContext.java
Fri Sep 29 12:44:14 2006
@@ -364,13 +364,17 @@
     protected abstract boolean removeBinding(String name, boolean removeNotEmptyContext)
throws NamingException;
 
     protected void removeDeepBinding(Name name, boolean pruneEmptyContexts) throws NamingException
{
+        removeDeepBinding(name, pruneEmptyContexts, false);
+    }
+
+    protected void removeDeepBinding(Name name, boolean pruneEmptyContexts, boolean removeNotEmptyContext)
throws NamingException {
         if (name == null) throw new NullPointerException("name is null");
         if (name.isEmpty()) {
             throw new InvalidNameException("Name is empty");
         }
 
         if (name.size() == 1) {
-            removeBinding(name.get(0), false);
+            removeBinding(name.get(0), removeNotEmptyContext);
             return;
         }
 



Mime
View raw message