hlship      2003/10/09 16:16:24

  Modified:    hivemind/framework project.xml project.properties
               hivemind/framework/src/java/org/apache/commons/hivemind/impl
                        ServiceExtensionPointImpl.java
                        ElementsProxyList.java ThreadedServiceModel.java
                        RegistryBuilder.java ElementsInnerProxyList.java
               hivemind/framework/src/java/org/apache/commons/hivemind
                        HiveMind.java
               hivemind/framework/src/java/org/apache/commons/hivemind/util
                        LocalizedNameGenerator.java
               hivemind/library project.properties project.xml
  Log:
  Add PMD reports and make some fixes based on the reports.
  
  Revision  Changes    Path
  1.9       +2 -1      jakarta-commons-sandbox/hivemind/framework/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/project.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- project.xml       9 Oct 2003 22:58:15 -0000       1.8
  +++ project.xml       9 Oct 2003 23:16:24 -0000       1.9
  @@ -170,6 +170,7 @@
     <reports>
       <report>maven-javadoc-plugin</report>
       <report>maven-jxr-plugin</report>
  +    <report>maven-pmd-plugin</report>
       <report>maven-junit-report-plugin</report>  
       <report>maven-clover-plugin</report>  
      </reports>
  
  
  
  1.5       +5 -1      jakarta-commons-sandbox/hivemind/framework/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/project.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- project.properties        20 Sep 2003 12:48:19 -0000      1.4
  +++ project.properties        9 Oct 2003 23:16:24 -0000       1.5
  @@ -5,3 +5,7 @@
   # with an IncompatibleClassChange exception if fork is false.
   maven.junit.fork=yes
   
  +maven.jar.index=true
  +
  +maven.pmd.enable=true
  +maven.pmd.excludes=org/apache/commons/hivemind/test/**
  
  
  
  1.5       +1 -5      
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ServiceExtensionPointImpl.java
  
  Index: ServiceExtensionPointImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ServiceExtensionPointImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServiceExtensionPointImpl.java    1 Oct 2003 20:43:21 -0000       1.4
  +++ ServiceExtensionPointImpl.java    9 Oct 2003 23:16:24 -0000       1.5
  @@ -68,8 +68,6 @@
   import org.apache.commons.hivemind.ServiceModel;
   import org.apache.commons.hivemind.schema.Schema;
   import org.apache.commons.lang.builder.ToStringBuilder;
  -import org.apache.commons.logging.Log;
  -import org.apache.commons.logging.LogFactory;
   
   /**
    * Abstract implementation of [EMAIL PROTECTED] 
org.apache.commons.hivemind.ServiceExtensionPoint}.
  @@ -84,8 +82,6 @@
       extends AbstractExtensionPoint
       implements ConstructableServiceExtensionPoint
   {
  -    private static final Log LOG = 
LogFactory.getLog(ServiceExtensionPointImpl.class);
  -
       private String _serviceInterfaceName;
   
       private Class _serviceInterface;
  
  
  
  1.4       +8 -3      
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ElementsProxyList.java
  
  Index: ElementsProxyList.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ElementsProxyList.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ElementsProxyList.java    1 Oct 2003 20:43:21 -0000       1.3
  +++ ElementsProxyList.java    9 Oct 2003 23:16:24 -0000       1.4
  @@ -108,10 +108,15 @@
       {
           return _inner.toString();
       }
  -    
  +
       public boolean equals(Object o)
       {
  -     return _inner.equals(o);
  +        return _inner.equals(o);
  +    }
  +
  +    public int hashCode()
  +    {
  +        return _inner.hashCode();
       }
   
       public void setInner(List list)
  
  
  
  1.8       +1 -2      
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ThreadedServiceModel.java
  
  Index: ThreadedServiceModel.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ThreadedServiceModel.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ThreadedServiceModel.java 9 Oct 2003 22:58:16 -0000       1.7
  +++ ThreadedServiceModel.java 9 Oct 2003 23:16:24 -0000       1.8
  @@ -88,7 +88,6 @@
        */
       protected static final String SERVICE_ACCESSOR_METHOD_NAME = "_service";
   
  -    private Object _constructedService;
       private Object _serviceProxy;
       private ThreadEventNotifier _notifier;
   
  
  
  
  1.12      +4 -5      
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/RegistryBuilder.java
  
  Index: RegistryBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/RegistryBuilder.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- RegistryBuilder.java      9 Oct 2003 22:58:16 -0000       1.11
  +++ RegistryBuilder.java      9 Oct 2003 23:16:24 -0000       1.12
  @@ -585,7 +585,7 @@
               return;
   
           if (builder != null)
  -            addServiceInstanceBuilder(sourceModule, pointId, builder, true);
  +            addServiceInstanceBuilder(sourceModule, pointId, builder);
   
           if (interceptors == null)
               return;
  @@ -612,7 +612,7 @@
           List interceptors = id.getInterceptors();
   
           if (builder != null)
  -            addServiceInstanceBuilder(sourceModule, pointId, builder, false);
  +            addServiceInstanceBuilder(sourceModule, pointId, builder);
   
           int count = size(interceptors);
           for (int i = 0; i < count; i++)
  @@ -632,8 +632,7 @@
       private void addServiceInstanceBuilder(
           ModuleImpl sourceModule,
           String pointId,
  -        InstanceBuilder builder,
  -        boolean isInternal)
  +        InstanceBuilder builder)
       {
           if (LOG.isDebugEnabled())
               LOG.debug("Adding " + builder + " to service extension point " + 
pointId);
  
  
  
  1.2       +6 -1      
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ElementsInnerProxyList.java
  
  Index: ElementsInnerProxyList.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ElementsInnerProxyList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ElementsInnerProxyList.java       1 Oct 2003 20:43:21 -0000       1.1
  +++ ElementsInnerProxyList.java       9 Oct 2003 23:16:24 -0000       1.2
  @@ -117,6 +117,11 @@
           return inner().equals(o);
       }
   
  +    public int hashCode()
  +    {
  +        return inner().hashCode();
  +    }
  +
       public String toString()
       {
           if (_inner != null)
  
  
  
  1.7       +1 -4      
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/HiveMind.java
  
  Index: HiveMind.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/HiveMind.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HiveMind.java     3 Oct 2003 20:00:16 -0000       1.6
  +++ HiveMind.java     9 Oct 2003 23:16:24 -0000       1.7
  @@ -143,9 +143,6 @@
           }
       }
   
  -    private static final String[] EMPTY_STRING_ARRAY = {
  -    };
  -
       /**
        * Checks that the number of parameters provided to a service implementation 
factory
        * matches the expected number.
  
  
  
  1.2       +5 -5      
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/util/LocalizedNameGenerator.java
  
  Index: LocalizedNameGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/util/LocalizedNameGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalizedNameGenerator.java       16 Sep 2003 18:51:27 -0000      1.1
  +++ LocalizedNameGenerator.java       9 Oct 2003 23:16:24 -0000       1.2
  @@ -116,7 +116,7 @@
       private void advance()
       {
           _prevState = _state;
  -        
  +
           while (_state != EXHAUSTED)
           {
               _state++;
  @@ -141,7 +141,7 @@
   
                       // If _country is null, then we've already generated this string
                       // as state LCV and we can continue directly to state L
  -                    
  +
                       if (StringUtils.isBlank(_variant) || 
StringUtils.isBlank(_country))
                           continue;
   
  @@ -154,6 +154,7 @@
   
                       return;
   
  +                case BARE :
                   default :
                       return;
               }
  @@ -224,7 +225,6 @@
           return _buffer.toString();
       }
   
  -
       public Locale getCurrentLocale()
       {
           switch (_prevState)
  @@ -247,6 +247,6 @@
   
               default :
                   return null;
  -}
  +        }
       }
   }
  
  
  
  1.4       +4 -3      jakarta-commons-sandbox/hivemind/library/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/library/project.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.properties        25 Sep 2003 21:38:40 -0000      1.3
  +++ project.properties        9 Oct 2003 23:16:24 -0000       1.4
  @@ -1,9 +1,10 @@
   # $Id$
   
   
  -# This seems to be necessary to get the full code coverage.
   maven.jar.index=true
   
   # This seems to be necessary to ensure that Clover collects
   # all the code coverage information.
  -maven.junit.fork=yes
  \ No newline at end of file
  +maven.junit.fork=yes
  +
  +maven.pmd.enable=true
  \ No newline at end of file
  
  
  
  1.3       +2 -1      jakarta-commons-sandbox/hivemind/library/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/library/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml       25 Sep 2003 22:02:12 -0000      1.2
  +++ project.xml       9 Oct 2003 23:16:24 -0000       1.3
  @@ -169,6 +169,7 @@
     <reports>
       <report>maven-javadoc-plugin</report>
       <report>maven-jxr-plugin</report>
  +    <report>maven-pmd-plugin</report>    
       <report>maven-junit-report-plugin</report>  
       <report>maven-clover-plugin</report>  
      </reports>
  
  
  

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

Reply via email to