User: starksm 
  Date: 01/09/06 20:12:44

  Modified:    src/main/org/jnp/interfaces NamingContext.java
  Log:
  The createSubcontext method was not correctly identifying duplicate attempts
  to create the same subcontext.
  
  Revision  Changes    Path
  1.11      +8 -3      jnp/src/main/org/jnp/interfaces/NamingContext.java
  
  Index: NamingContext.java
  ===================================================================
  RCS file: /cvsroot/jboss/jnp/src/main/org/jnp/interfaces/NamingContext.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- NamingContext.java        2001/06/22 19:08:25     1.10
  +++ NamingContext.java        2001/09/07 03:12:44     1.11
  @@ -37,7 +37,7 @@
   
    *   @author oberg
    *   @author [EMAIL PROTECTED]
  - *   @version $Revision: 1.10 $
  + *   @version $Revision: 1.11 $
    */
   public class NamingContext
      implements Context, java.io.Serializable
  @@ -637,18 +637,23 @@
       public Context createSubcontext(Name name)
         throws NamingException 
       {
  +       if( name.size() == 0 )
  +          throw new InvalidNameException("Cannot pass an empty name to 
createSubcontext");
  +
           Hashtable env = getEnv(name);
           checkRef(env);
           try
           {
               name = getAbsoluteName(name);
               return naming.createSubcontext(name);
  -        } catch (CannotProceedException cpe)
  +        }
  +        catch (CannotProceedException cpe)
           {
               cpe.setEnvironment(env);
               Context cctx = NamingManager.getContinuationContext(cpe);
               return cctx.createSubcontext(cpe.getRemainingName());
  -        } catch (IOException e)
  +        }
  +        catch (IOException e)
           {
               naming = null;
               removeServer(env);
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to