[jboss-jira] [JBoss JIRA] (DROOLS-546) FactType.get/set should throw specific exception (not NPE) for unknown fields

Mario Fusco (JIRA) issues at jboss.org
Mon Jul 7 12:34:24 EDT 2014


     [ https://issues.jboss.org/browse/DROOLS-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco resolved DROOLS-546.
--------------------------------

    Fix Version/s: 6.1.0.Final
       Resolution: Done


We decided to not add a further exception but just prevent the NPE returning null when you try to get the value of a not existing field and ignoring the corresponding setter.

> FactType.get/set should throw specific exception (not NPE) for unknown fields
> -----------------------------------------------------------------------------
>
>                 Key: DROOLS-546
>                 URL: https://issues.jboss.org/browse/DROOLS-546
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 6.1.0.CR1
>            Reporter: Benoit Voisin
>            Assignee: Mario Fusco
>             Fix For: 6.1.0.Final
>
>
> factType.get(instance, "unknownField") is currently throwing an NPE. This gives improper information to the user/developper.
> I propose that it throws a new UnknownFactFieldException giving improved information giving good hints for debugging or enabling specific exception management.
> See pull request for test-case and proposed fix



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jboss-jira mailing list