harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r448888 - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/beancontext/ test/java/org/apache/harmony/beans/tests/java/beans/beancontext/
Date Fri, 22 Sep 2006 11:07:15 GMT
Author: smishura
Date: Fri Sep 22 04:07:09 2006
New Revision: 448888

URL: http://svn.apache.org/viewvc?view=rev&rev=448888
Log:
Apply patch for HARMONY-1516 ([claslib][beans] unexpected NPE for BeanContextServiceRevokedEvent.isServiceClass(null))

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java?view=diff&rev=448888&r1=448887&r2=448888
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java
Fri Sep 22 04:07:09 2006
@@ -75,6 +75,9 @@
      * @com.intel.drl.spec_ref
      */
     public boolean isServiceClass(Class service) {
+    	if (service == null) {
+            return false;
+        }
         return service.equals(this.serviceClass);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java?view=diff&rev=448888&r1=448887&r2=448888
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
Fri Sep 22 04:07:09 2006
@@ -112,6 +112,9 @@
                 services, BeanContext.class, true);
         assertTrue(event.isServiceClass(BeanContext.class));
         assertFalse(event.isServiceClass(Integer.class));
+
+        //Regression for HARMONY-1516
+        assertFalse(event.isServiceClass(null));
     }
 
     public void testIsCurrentServiceInvalidNow() {



Mime
View raw message