[jboss-cvs] jboss-seam/src/main/org/jboss/seam/deployment ...

Gavin King gavin.king at jboss.com
Thu Jan 25 00:05:12 EST 2007


  User: gavin   
  Date: 07/01/25 00:05:12

  Modified:    src/main/org/jboss/seam/deployment   NamespaceScanner.java
                        Scanner.java
  Log:
  ws
  
  Revision  Changes    Path
  1.6       +16 -7     jboss-seam/src/main/org/jboss/seam/deployment/NamespaceScanner.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NamespaceScanner.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/deployment/NamespaceScanner.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- NamespaceScanner.java	16 Dec 2006 02:58:10 -0000	1.5
  +++ NamespaceScanner.java	25 Jan 2007 05:05:12 -0000	1.6
  @@ -45,24 +45,33 @@
       @Override
       protected void handleItem(String name)
       {
  -        if (name.endsWith("/package-info.class")) {
  +        if ( name.endsWith("/package-info.class") ) 
  +        {
               String packageName = filenameToPackageName(name);
               Package pkg = getPackage(packageName);
  -            if (pkg == null) {
  +            if (pkg == null) 
  +            {
                   log.warn("Cannot load package Dinfo for " + packageName);
  -            } else {
  -                if (pkg.getAnnotation(Namespace.class) != null) {
  +            } 
  +            else 
  +            {
  +                if (pkg.getAnnotation(Namespace.class) != null) 
  +                {
                       packages.add(pkg);
                   }
               }
           }
       }
   
  -    protected Package getPackage(String name) {
  -        try {
  +    protected Package getPackage(String name) 
  +    {
  +        try 
  +        {
               Class c = classLoader.loadClass(name + ".package-info");
               return c != null ? c.getPackage() : null;
  -        } catch (Exception e) {
  +        } 
  +        catch (Exception e) 
  +        {
               return null;
           }
       }
  
  
  
  1.23      +9 -6      jboss-seam/src/main/org/jboss/seam/deployment/Scanner.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Scanner.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/deployment/Scanner.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- Scanner.java	16 Dec 2006 02:58:10 -0000	1.22
  +++ Scanner.java	25 Jan 2007 05:05:12 -0000	1.23
  @@ -1,4 +1,4 @@
  -//$Id: Scanner.java,v 1.22 2006/12/16 02:58:10 nrichards Exp $
  +//$Id: Scanner.java,v 1.23 2007/01/25 05:05:12 gavin Exp $
   package org.jboss.seam.deployment;
   
   import java.io.DataInputStream;
  @@ -41,23 +41,25 @@
      
      public static String filenameToClassname(String filename)
      {
  -      return filename.substring(0, filename.lastIndexOf(".class"))
  +      return filename.substring( 0, filename.lastIndexOf(".class") )
               .replace('/', '.').replace('\\', '.');
      }
      
   
  -    protected void scan() {
  +    protected void scan() 
  +    {
         Enumeration<URL> urls;
         try
         {
            urls = classLoader.getResources(resourceName);
         }
  -      catch (IOException ioe) {
  +      catch (IOException ioe) 
  +      {
            log.warn("could not read: " + resourceName, ioe);
            return;
         }
         
  -      while (urls.hasMoreElements())
  +      while ( urls.hasMoreElements() )
         {
            try
            {
  @@ -94,7 +96,8 @@
                  handleArchive(file);
               }
            }
  -         catch (IOException ioe) {
  +         catch (IOException ioe) 
  +         {
               log.warn("could not read entries", ioe);
            }
         }
  
  
  



More information about the jboss-cvs-commits mailing list