[jboss-jira] [JBoss JIRA] (DROOLS-2182) NPE when @Expires is missing on event type
Mario Fusco (JIRA)
issues at jboss.org
Tue Jan 9 13:17:00 EST 2018
[ https://issues.jboss.org/browse/DROOLS-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco reopened DROOLS-2182:
---------------------------------
> 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)
More information about the jboss-jira
mailing list