[
https://issues.jboss.org/browse/DROOLS-2182?page=com.atlassian.jira.plugi...
]
Mario Fusco resolved DROOLS-2182.
---------------------------------
Resolution: Cannot Reproduce Bug
I definitively cannot reproduce the NPE you reported. If you have a reproducer feel free
to attach it to this ticket and reopen it.
NPE when @Expires is missing on event type
------------------------------------------
Key: DROOLS-2182
URL:
https://issues.jboss.org/browse/DROOLS-2182
Project: Drools
Issue Type: Bug
Affects Versions: 7.5.0.Final
Reporter: Christian Bauer
Assignee: Mario Fusco
This code in {{ClassObjectTypeConf}} assumes that an event class always has an @Expires
annotation, which is optional:
{code}
Role role = clazz.getAnnotation(Role.class);
if (role != null) {
isEvent = role.value() == Type.EVENT;
if (isEvent) {
Expires expires = clazz.getAnnotation(Expires.class);
expirationOffset = TimeIntervalParser.parseSingle( expires.value()
);
}
}
{code}
{code}
java.lang.NullPointerException
at org.drools.core.reteoo.ClassObjectTypeConf.<init>(ClassObjectTypeConf.java:99)
at
org.drools.core.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:69)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:181)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1493)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1453)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1447)
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)