[jboss-jira] [JBoss JIRA] Commented: (JBRULES-575) Shadow facts break when a fact Class has 2 properties (with a different name) of the same fact class

Edson Tirelli (JIRA) jira-events at jboss.com
Thu Dec 14 11:45:48 EST 2006


    [ http://jira.jboss.com/jira/browse/JBRULES-575?page=comments#action_12348754 ] 
            
Edson Tirelli commented on JBRULES-575:
---------------------------------------

Ok, found the problem.

Java 5 allows you override a method changing its return type. In your case, Solution has a method clone() that returns a Solution object, while Match overrides the clone method returning a Match object. 

Need to improve proxy factory to override only the last overriden method: in this case, Match.clone(), and ignore parent overriden methods (Solution.clone() in your case).



> Shadow facts break when a fact Class has 2 properties (with a different name) of the same fact class
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-575
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-575
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.1-m1
>            Reporter: Geoffrey De Smet
>         Assigned To: Edson Tirelli
>            Priority: Critical
>
> See user mailing list: [trunk] Repetitive field name/signature in class
> ava.lang.ClassFormatError: Repetitive field name/signature in class file net/sf/taseree/samples/travelingtournament/domain/MatchShadowProxy
> Here's my Match class:
> public class Match extends AbstractPersistable implements Comparable<Match>, Solution {
>     private Team homeTeam;
>     private Team awayTeam;
>     private Day day;
>     // getters, setters, clone(), toString()
> }
> AbstractPersistable has a Long id with getters/setters
> I will make a testcase with Cheese and provide a testcase patch, but it seems the trunk's pom's don't do "mvn idea:idea" properly, like the branch did,
> so I 'll provide a pom.xml patch first :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list