User: juhalindfors
  Date: 02/02/05 04:50:59

  Modified:    src/main/javax/management/loading MLet.java
  Log:
  Fix: malformed URL with default codebase
  
  Revision  Changes    Path
  1.4       +4 -3      jmx/src/main/javax/management/loading/MLet.java
  
  Index: MLet.java
  ===================================================================
  RCS file: /cvsroot/jboss/jmx/src/main/javax/management/loading/MLet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MLet.java 2002/02/03 19:04:42     1.3
  +++ MLet.java 2002/02/05 12:50:59     1.4
  @@ -30,7 +30,7 @@
   /**
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Juha Lindfors</a>.
  - * @version $Revision: 1.3 $  
  + * @version $Revision: 1.4 $  
    */
   public class MLet 
      extends URLClassLoader 
  @@ -232,13 +232,14 @@
               
               // if no codebase is specified then the url of the mlet text file is 
used
               if (entry.codebase == null)
  -               entry.codebase = url.toString();
  +               entry.codebase = url.toString().substring(0, 
url.toString().lastIndexOf('/'));
                  
               while(tokenizer.hasMoreElements())
                  addURL(new URL(entry.codebase + ((entry.codebase.endsWith("/")) ? "" 
: "/") + tokenizer.nextToken()));
                  
               try
               {
  +               // FIXME: create with args!
                  mbeans.add(server.createMBean(entry.code, (entry.name != null) ? new 
ObjectName(entry.name) : null, objectName));
               }
               catch (Throwable t)
  @@ -247,7 +248,7 @@
                  mbeans.add(t);
                  
                  // FIXME: log it
  -               System.out.println(t.toString());
  +               System.out.println("MLET ERROR: can't create MBean: " + 
t.toString());
               }            
            }
         }
  
  
  

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

Reply via email to