harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r465197 - 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 Wed, 18 Oct 2006 10:14:18 GMT
Author: mloenko
Date: Wed Oct 18 03:14:15 2006
New Revision: 465197

URL: http://svn.apache.org/viewvc?view=rev&rev=465197
Log:
applied patch from HARMONY-1153
[classlib][beans] getSourceAsBeanContextServices() returns 'null' on Harmony and valid object
on RI

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=465197&r1=465196&r2=465197
==============================================================================
--- 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
Wed Oct 18 03:14:15 2006
@@ -37,6 +37,7 @@
         super(bcs);
         this.serviceClass = sc;
         this.invalidateRefs = invalidate;
+        setPropagatedFrom(bcs);
     }
 
     public Class getServiceClass() {

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=465197&r1=465196&r2=465197
==============================================================================
--- 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
Wed Oct 18 03:14:15 2006
@@ -20,9 +20,11 @@
 import java.beans.beancontext.BeanContext;
 import java.beans.beancontext.BeanContextServiceRevokedEvent;
 import java.beans.beancontext.BeanContextServices;
+import java.beans.beancontext.BeanContextServicesSupport;
 import java.io.IOException;
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Locale;
 
 import junit.framework.TestCase;
 
@@ -99,6 +101,14 @@
                 services, BeanContext.class, true);
         assertSame(services, event.getSource());
         assertSame(services, event.getSourceAsBeanContextServices());
+
+        // Regression for HARMONY-1153
+        BeanContextServicesSupport sup = new BeanContextServicesSupport(
+                new MockBeanContextServices(), new Locale("ru", "RU"), false,
+                false);
+        event = new BeanContextServiceRevokedEvent(sup,
+                MockBeanContextServices.class, false);
+        assertNotNull(event.getSourceAsBeanContextServices());
     }
 
     public void testGetServiceClass() {



Mime
View raw message