hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject cvs commit: jakarta-hivemind status.xml
Date Sat, 19 Feb 2005 16:28:09 GMT
knut        2005/02/19 08:28:09

  Modified:    framework/src/java/org/apache/hivemind/service/impl
                        ServiceObjectProvider.java
               framework/src/test/org/apache/hivemind/service/impl
                        TestObjectProviders.java
               .        status.xml
  Log:
  fixed HIVEMIND-60 (service: object provider throws NPE with empty locator)
  
  Revision  Changes    Path
  1.4       +9 -8      jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/ServiceObjectProvider.java
  
  Index: ServiceObjectProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/ServiceObjectProvider.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServiceObjectProvider.java	6 Jan 2005 01:45:10 -0000	1.3
  +++ ServiceObjectProvider.java	19 Feb 2005 16:28:09 -0000	1.4
  @@ -14,14 +14,15 @@
   
   package org.apache.hivemind.service.impl;
   
  +import org.apache.hivemind.HiveMind;
   import org.apache.hivemind.Location;
   import org.apache.hivemind.internal.Module;
   import org.apache.hivemind.service.ObjectProvider;
   
   /**
  - * An {@link org.apache.hivemind.service.ObjectProvider} that provides
  - * access to services. Deployed with the prefix "service".
  - *
  + * An {@link org.apache.hivemind.service.ObjectProvider}that provides access to services.
Returns
  + * null if the input is null. Deployed with the prefix "service".
  + * 
    * @author Howard Lewis Ship
    */
   public class ServiceObjectProvider implements ObjectProvider
  @@ -30,12 +31,12 @@
        * Interprets the locator as a service id, and passes it to
        * {@link Module#getService(String, Class)}.
        */
  -    public Object provideObject(
  -        Module contributingModule,
  -        Class propertyType,
  -        String locator,
  -        Location location)
  +    public Object provideObject(Module contributingModule, Class propertyType, String locator,
  +            Location location)
       {
  +        if (HiveMind.isBlank(locator))
  +            return null;
  +
           return contributingModule.getService(locator, propertyType);
       }
   
  
  
  
  1.8       +2 -0      jakarta-hivemind/framework/src/test/org/apache/hivemind/service/impl/TestObjectProviders.java
  
  Index: TestObjectProviders.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/org/apache/hivemind/service/impl/TestObjectProviders.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestObjectProviders.java	11 Feb 2005 18:15:21 -0000	1.7
  +++ TestObjectProviders.java	19 Feb 2005 16:28:09 -0000	1.8
  @@ -63,6 +63,8 @@
   
           assertSame(expected, actual);
   
  +        assertNull(p.provideObject(m, Location.class, "", null));
  +
           verifyControls();
       }
   
  
  
  
  1.102     +1 -0      jakarta-hivemind/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/status.xml,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- status.xml	19 Feb 2005 02:40:55 -0000	1.101
  +++ status.xml	19 Feb 2005 16:28:09 -0000	1.102
  @@ -38,6 +38,7 @@
         <action type="update" dev="HLS" fixes-bug="HIVEMIND-92" due-to="Brian K. Wallace">
ManifestClassPath accessing deprecated variable </action>
         <action type="update" dev="HLS"> Allow service interfaces to be ordinary non-interface
classes. </action>
         <action type="update" dev="HLS"> Extend instance translator to configure properties
of the instantiated instance. </action>
  +      <action type="fix" dev="KW" fixes-bug="HIVEMIND-60" due-to="Trent McClenahan">
service: object provider throws NPE with empty locator </action>
       </release>
       <release version="1.1-alpha-1" date="Jan 19 2005">
         <action type="add" dev="KW"> Added &lt;dependency&gt; construct providing
support for dependencies between modules. Refactoring of RegistryBuilder: Now constructs Registry
using a ModuleProvider. </action>
  
  
  

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


Mime
View raw message