Bug 1047911
| Summary: | DecisionTableConfigurationImpl throws NPE in toProperties() | ||
|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Marek Winkler <mwinkler> |
| Component: | BRE | Assignee: | Edson Tirelli <etirelli> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Marek Winkler <mwinkler> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.0.0 | CC: | vigoyal |
| Target Milestone: | ER1 | ||
| Target Release: | 6.0.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Known Issue | |
| Doc Text: |
Cause:
DecisionTableConfigurationImpl.toProperties() throws NPE, when programatically configuring Resource's DecisionTableInputType while not setting worksheetName.
Consequence:
User is unable to programatically configure DecisionTableInputType of a Decision Table resource while not configuring a non-null worksheetName.
Workaround (if any):
Extend DecisionTableConfigurationImpl class, override method toProperties() to handle null worksheetName.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-08-06 19:57:57 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Done. Thanks! Verified on BRMS 6.0.1 ER1. |
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.