remm        2004/01/27 03:56:07

  Modified:    catalina/src/share/org/apache/naming NamingContext.java
  Log:
  - Throw the proper exception type when a name is already bound.
  - Submitted by Robert Krüger.
  
  Revision  Changes    Path
  1.3       +6 -5      
jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/NamingContext.java
  
  Index: NamingContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/NamingContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NamingContext.java        29 May 2003 16:19:53 -0000      1.2
  +++ NamingContext.java        27 Jan 2004 11:56:07 -0000      1.3
  @@ -75,6 +75,7 @@
   import javax.naming.Reference;
   import javax.naming.NamingEnumeration;
   import javax.naming.NamingException;
  +import javax.naming.NameAlreadyBoundException;
   import javax.naming.NameNotFoundException;
   import javax.naming.NotContextException;
   import javax.naming.InitialContext;
  @@ -899,7 +900,7 @@
               }
           } else {
               if ((!rebind) && (entry != null)) {
  -                throw new NamingException
  +                throw new NameAlreadyBoundException
                       (sm.getString("namingContext.alreadyBound", name.get(0)));
               } else {
                   // Getting the type of the object and wrapping it within a new
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to