harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r553718 - in /harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
Date Fri, 06 Jul 2007 03:42:00 GMT
Author: pyang
Date: Thu Jul  5 20:41:59 2007
New Revision: 553718

URL: http://svn.apache.org/viewvc?view=rev&rev=553718
Log:
In the BeanContextServiceRevokeEvent constructor, the propgatedFrom should not be set, fix
this bug with regression test

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

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java?view=diff&rev=553718&r1=553717&r2=553718
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServiceRevokedEvent.java
Thu Jul  5 20:41:59 2007
@@ -36,8 +36,7 @@
 
         super(bcs);
         this.serviceClass = sc;
-        this.invalidateRefs = invalidate;
-        setPropagatedFrom(bcs);
+        this.invalidateRefs = invalidate;        
     }
 
     public Class getServiceClass() {
@@ -45,7 +44,7 @@
     }
 
     public BeanContextServices getSourceAsBeanContextServices() {
-        return (BeanContextServices) super.propagatedFrom;
+        return (BeanContextServices) super.getBeanContext();
     }
 
     public boolean isCurrentServiceInvalidNow() {

Modified: 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/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java?view=diff&rev=553718&r1=553717&r2=553718
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
Thu Jul  5 20:41:59 2007
@@ -161,6 +161,7 @@
         assertEqualsSerially(event,
                 (BeanContextServiceRevokedEvent) SerializationTester
                         .getDeserilizedObject(event));
+
     }
 
      public void testSerialization_Compatibility() throws Exception {
@@ -174,6 +175,19 @@
              }
          });
      }
+     
+     public void testConstructor() throws Exception {
+        BeanContextServices bcs = new MockBeanContextServices();
+        BeanContextServiceRevokedEvent event = new BeanContextServiceRevokedEvent(
+                bcs, ArrayList.class, true);
+        assertEquals(null, event.getPropagatedFrom());
+        assertEquals(ArrayList.class, event.getServiceClass());
+        assertSame(bcs, event.getSource());
+        assertSame(bcs, event.getBeanContext());
+        assertSame(bcs, event.getSourceAsBeanContextServices());
+        assertFalse(event.isPropagated());
+    }
+     
     private void assertEqualsSerially(BeanContextServiceRevokedEvent orig,
             BeanContextServiceRevokedEvent ser) {
         assertNull(ser.getSource());



Mime
View raw message