Bug 1047911 - DecisionTableConfigurationImpl throws NPE in toProperties()
Summary: DecisionTableConfigurationImpl throws NPE in toProperties()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER1
: 6.0.1
Assignee: Edson Tirelli
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-02 14:48 UTC by Marek Winkler
Modified: 2014-08-06 19:57 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 19:57:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Winkler 2014-01-02 14:48:11 UTC
Description of problem:

DecisionTableConfigurationImpl.toProperties() throws NPE, when I try to programatically configure Resource's DecisionTableInputType while I am not setting worksheetName (which is optional according to javadoc and should be allowed to be null):

public Properties toProperties() {
    Properties prop = super.toProperties();
    prop.setProperty( DROOLS_DT_TYPE, inputType.toString() );
    prop.setProperty( DROOLS_DT_WORKSHEET, worksheetName );
    return prop;
}

The problem is that prop is a HashTable not allowing null values (worksheetName in this case).

Since there are workarounds for this problem, I am setting severity to medium.

Version-Release number of selected component (if applicable):

Drools 6.0.1-SNAPSHOT
BRMS 6.0.0.ER7

How reproducible:

Try to configure Resource's DecisionTableInputType like this and compile the KieBase:

DecisionTableConfiguration dtConf = new DecisionTableConfigurationImpl();
dtConf.setInputType(type);
resource.setConfiguration(dtConf);

Is there a factory for DecisionTableConfiguration that should be used in this case?

Actual results:

Writing DecisionTableConfiguration into Properties causes NPE and KieBase compilation fails.

Expected results:

KieBase compilation succeeds.

Comment 1 Edson Tirelli 2014-01-30 21:41:05 UTC
Done. Thanks!

Comment 2 Marek Winkler 2014-02-21 09:30:26 UTC
Verified on BRMS 6.0.1 ER1.


Note You need to log in before you can comment on or make changes to this bug.