harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r399226 - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/EventHandler.java test/java/tests/api/java/beans/EventHandlerTest.java
Date Wed, 03 May 2006 09:33:53 GMT
Author: mloenko
Date: Wed May  3 02:33:50 2006
New Revision: 399226

URL: http://svn.apache.org/viewcvs?rev=399226&view=rev
Log:
fixes for HARMONY-429
[classlib] java.beans.EventHandler.create(Class,Object,String) throws java.lang.IllegalArgumentException:
<interface> is not visible from class loader

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventHandlerTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java?rev=399226&r1=399225&r2=399226&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java
Wed May  3 02:33:50 2006
@@ -121,7 +121,7 @@
             String action,
             String eventPropertyName,
             String listenerMethodName) {
-        return Proxy.newProxyInstance(null, new Class[] { listenerInterface },
+        return Proxy.newProxyInstance(target.getClass().getClassLoader(), new Class[] { listenerInterface
},
                new EventHandler(target, action, eventPropertyName,
                        listenerMethodName));
     }
@@ -134,7 +134,7 @@
             Object target,
             String action,
             String eventPropertyName) {
-        return Proxy.newProxyInstance(null, new Class[] { listenerInterface },
+        return Proxy.newProxyInstance(target.getClass().getClassLoader(), new Class[] { listenerInterface
},
             new EventHandler(target, action, eventPropertyName, null));
     }
 
@@ -145,7 +145,7 @@
             Class listenerInterface,
             Object target,
             String action) {
-        return Proxy.newProxyInstance(null, new Class[] { listenerInterface },
+        return Proxy.newProxyInstance(target.getClass().getClassLoader(), new Class[] { listenerInterface
},
             new EventHandler(target, action, null, null));
     }
     

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventHandlerTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventHandlerTest.java?rev=399226&r1=399225&r2=399226&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/tests/api/java/beans/EventHandlerTest.java
Wed May  3 02:33:50 2006
@@ -788,13 +788,18 @@
 		assertEquals("double:3.3", target.getActionRecord());
 	}
 
+    /**
+     * @tests java.beans.EventHandler#create(Class<T> listenerInterface, Object
+     *        target, String action))
+     */
 	public void testEventHandlerCreate() {
+        //Regression for HARMONY-429
 		((FredListener) EventHandler.create(FredListener.class,
 				new Untitled1(), "i", "i"))
 				.fireFredEvent(new FredEvent("bean2"));
 	}
 
-	public interface FredListener extends EventListener {
+    public interface FredListener extends EventListener {
 		public void fireFredEvent(FredEvent event);
 	}
 



Mime
View raw message