You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemind.apache.org by hl...@apache.org on 2004/08/19 16:11:42 UTC

cvs commit: jakarta-hivemind/framework/src/test/org/apache/hivemind/util TestPropertyUtils.java

hlship      2004/08/19 07:11:42

  Modified:    framework/src/java/org/apache/hivemind/ant
                        ConstructRegistry.java
               framework/src/test/hivemind/test/services
                        TestBuilderFactory.java
               framework/src/java/org/apache/hivemind/impl
                        ImplMessages.java RegistryImpl.java
               framework/src/test/hivemind/test/rules
                        TestEnumerationTranslator.java
               framework/src/java/org/apache/hivemind/parse
                        DescriptorParser.java
               framework/src/test/org/apache/hivemind/util
                        TestPropertyUtils.java
  Log:
  Cleanup some uncessary imports, unused variables and unused methods.
  
  Revision  Changes    Path
  1.10      +0 -2      jakarta-hivemind/framework/src/java/org/apache/hivemind/ant/ConstructRegistry.java
  
  Index: ConstructRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/ant/ConstructRegistry.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ConstructRegistry.java	3 Aug 2004 14:02:17 -0000	1.9
  +++ ConstructRegistry.java	19 Aug 2004 14:11:42 -0000	1.10
  @@ -233,8 +233,6 @@
       private Document parse(DocumentBuilder builder, Resource descriptor)
           throws SAXException, IOException
       {
  -        String path = descriptor.getPath();
  -
           return parseXML(builder, descriptor);
       }
   
  
  
  
  1.16      +0 -2      jakarta-hivemind/framework/src/test/hivemind/test/services/TestBuilderFactory.java
  
  Index: TestBuilderFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/services/TestBuilderFactory.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- TestBuilderFactory.java	18 Aug 2004 19:34:11 -0000	1.15
  +++ TestBuilderFactory.java	19 Aug 2004 14:11:42 -0000	1.16
  @@ -327,8 +327,6 @@
           module.getClassResolver();
           mc.setReturnValue(new DefaultClassResolver());
   
  -        StringHolder h = new StringHolderImpl();
  -
           module.getService(StringHolder.class);
           mc.setThrowable(new ApplicationRuntimeException("Simulated failure."));
   
  
  
  
  1.16      +0 -2      jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/ImplMessages.java
  
  Index: ImplMessages.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/ImplMessages.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ImplMessages.java	18 Aug 2004 19:34:09 -0000	1.15
  +++ ImplMessages.java	19 Aug 2004 14:11:42 -0000	1.16
  @@ -198,8 +198,6 @@
           int actualCount,
           Occurances expectation)
       {
  -        String key = "occurances." + expectation.getName();
  -
           return _formatter.format(
               "wrong-number-of-contributions",
               point.getExtensionPointId(),
  
  
  
  1.17      +2 -4      jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/RegistryImpl.java
  
  Index: RegistryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/RegistryImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- RegistryImpl.java	19 Aug 2004 13:35:54 -0000	1.16
  +++ RegistryImpl.java	19 Aug 2004 14:11:42 -0000	1.17
  @@ -529,8 +529,8 @@
   
       public boolean containsService(Class serviceInterface)
       {
  -        boolean contains = false;
  -
  +    	checkShutdown();
  +    	
           List servicePoints = (List) _servicePointsByInterface.get(serviceInterface);
   
           return size(servicePoints) == 1;
  @@ -539,8 +539,6 @@
       public boolean containsService(String serviceId, Class serviceInterface)
       {
           checkShutdown();
  -
  -        boolean contains = false;
   
           ServicePoint point = (ServicePoint) _servicePoints.get(serviceId);
   
  
  
  
  1.9       +0 -13     jakarta-hivemind/framework/src/test/hivemind/test/rules/TestEnumerationTranslator.java
  
  Index: TestEnumerationTranslator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/rules/TestEnumerationTranslator.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestEnumerationTranslator.java	18 Jul 2004 14:43:11 -0000	1.8
  +++ TestEnumerationTranslator.java	19 Aug 2004 14:11:42 -0000	1.9
  @@ -17,11 +17,7 @@
   import hivemind.test.FrameworkTestCase;
   
   import org.apache.hivemind.ApplicationRuntimeException;
  -import org.apache.hivemind.Element;
  -import org.apache.hivemind.Location;
   import org.apache.hivemind.impl.DefaultClassResolver;
  -import org.apache.hivemind.impl.ElementImpl;
  -import org.apache.hivemind.impl.LocationImpl;
   import org.apache.hivemind.internal.Module;
   import org.apache.hivemind.schema.rules.EnumerationTranslator;
   import org.easymock.MockControl;
  @@ -43,15 +39,6 @@
           c.setReturnValue(new DefaultClassResolver());
   
           return result;
  -    }
  -
  -    private Element forgeElement()
  -    {
  -        ElementImpl e = new ElementImpl();
  -        Location l = new LocationImpl(getResource("TestEnumerationTranslator.class"), 50);
  -        e.setLocation(l);
  -
  -        return e;
       }
   
       public void testNull()
  
  
  
  1.29      +1 -3      jakarta-hivemind/framework/src/java/org/apache/hivemind/parse/DescriptorParser.java
  
  Index: DescriptorParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/parse/DescriptorParser.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- DescriptorParser.java	18 Aug 2004 19:34:11 -0000	1.28
  +++ DescriptorParser.java	19 Aug 2004 14:11:42 -0000	1.29
  @@ -131,7 +131,7 @@
        */
       private static final int STATE_START = 0;
       private static final int STATE_MODULE = 1;
  -    private static final int STATE_DESCRIPTION = 2;
  +    // private static final int STATE_DESCRIPTION = 2;
       private static final int STATE_CONFIGURATION_POINT = 3;
       private static final int STATE_CONTRIBUTION = 4;
       private static final int STATE_SERVICE_POINT = 5;
  @@ -1397,8 +1397,6 @@
               initializeParser(resource, STATE_START);
   
               _resolver = resolver;
  -
  -            String path = resource.getPath();
   
               parseXML(resource);
   
  
  
  
  1.7       +0 -11     jakarta-hivemind/framework/src/test/org/apache/hivemind/util/TestPropertyUtils.java
  
  Index: TestPropertyUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/org/apache/hivemind/util/TestPropertyUtils.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestPropertyUtils.java	6 Aug 2004 17:03:31 -0000	1.6
  +++ TestPropertyUtils.java	19 Aug 2004 14:11:42 -0000	1.7
  @@ -24,10 +24,6 @@
   import java.util.List;
   
   import org.apache.hivemind.ApplicationRuntimeException;
  -import org.apache.hivemind.Location;
  -import org.apache.hivemind.Resource;
  -import org.apache.hivemind.impl.DefaultClassResolver;
  -import org.apache.hivemind.impl.LocationImpl;
   import org.apache.hivemind.test.HiveMindTestCase;
   
   /**
  @@ -37,13 +33,6 @@
    */
   public class TestPropertyUtils extends HiveMindTestCase
   {
  -    private Location makeLocation(int line)
  -    {
  -        Resource r = new ClasspathResource(new DefaultClassResolver(), "/foo/bar");
  -
  -        return new LocationImpl(r, line);
  -    }
  -
       public static class Bean
       {
           private int _value;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org