0 Replies Latest reply on Jun 24, 2004 5:45 AM by Marco Ladermann

    URLDirectoryScanner: addScanDir

    Marco Ladermann Newbie

      Hi,

      I just digged a little bit into the sources of package org.jboss.deployment.scanner and stumbled across the following lines of code in class URLDirectoryScanner which I don't understand:

      Line 94-111:
       /**
       * @jmx:managed-attribute
       */
       public void addScanDir(String urlSpec, String compClassName, String filterClassName)
       throws MalformedURLException
       {
      
       URL url = toUrl(urlSpec);
       // create a new comparator
       Comparator comp = null;
       if (compClassName != null)
       {
       try
       {
       Class compClass = Thread.currentThread().getContextClassLoader().loadClass("compClassName");
       comp = (Comparator)compClass.newInstance();
       } catch (Exception e)
       {
       log.warn("Unable to create instance of Comparator. Ignoring.", e);
       }
       }
      

      Could it be the case, that the quotes around "compClassName" are wrong?

      Marco