bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/35062] New: java.beans.EventHandler cannot find setter me


From: pcox at dev dot java dot net
Subject: [Bug classpath/35062] New: java.beans.EventHandler cannot find setter method
Date: 3 Feb 2008 11:32:42 -0000

Hi,

I tried running an application against classpath and found a flaw in running
code using EventHandler.

I have reconstructed a simple test case, attached. The basic problem is the
method resolver can't narrow a return type of Object on a getter to a find a
more specific type.

e.g. for b.setName((String)a.getObject()), Classpath complains that it can't
find a method setName(Object). 
The Sun behaviour is to infer the runtime type of String.

Running the attached test against a Sun JVM I get:

My name

Running against jamvm 1.5 and classpath 0.96.1 I get:

java.lang.RuntimeException: Method not called: Could not find a public method
named 'setName' in target class EventHandlerTest$Name which takes a 'class
java.lang.Object' argument or a property of this type.
   at java.beans.EventHandler.invoke(EventHandler.java:293)
   at $Proxy0.handle(Unknown Source)
   at EventHandlerTest.main(EventHandlerTest.java:7)


-- 
           Summary: java.beans.EventHandler cannot find setter method
           Product: classpath
           Version: 0.96.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcox at dev dot java dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35062





reply via email to

[Prev in Thread] Current Thread [Next in Thread]