User: starksm
Date: 01/09/06 19:56:55
Modified: src/main/org/jnp/interfaces Tag: Branch_2_4
NamingContext.java
Log:
The createSubcontext method was not correctly identifying duplicate attempts
to create the same subcontext.
Revision Changes Path
No revision
No revision
1.10.2.1 +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.10.2.1
diff -u -r1.10 -r1.10.2.1
--- NamingContext.java 2001/06/22 19:08:25 1.10
+++ NamingContext.java 2001/09/07 02:56:55 1.10.2.1
@@ -37,7 +37,7 @@
* @author oberg
* @author [EMAIL PROTECTED]
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.10.2.1 $
*/
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