Hello,

I have a method on my business model that return a parameterized type:

public <P extends Profile> P getProfileValidAt(Class<P> profileClass, Calendar
validAt) {
        List<P> history = getHistoryProfile(profileClass);
        
        for(P profile: history) {
                if (profile.getValidFrom().compareTo(validAt)<=0 &&
profile.getValidTo().compareTo(validAt)>=0) {
                        return profile;
                }
        }
        
        return null;
    }

I use jbossrule 3.0.3.
I my drl files, i use this method but it doesn't work. I have a compilation
error on the rules. If i change parameterized type to a specific profile class,
it works. Do jbossrule accept parameterized type as return value type ?
Thanks in advance.

_______________________________________________
rules-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-dev

Reply via email to