[jboss-jira] [JBoss JIRA] (DROOLS-3688) Implement usage of ScenarioHeaderMetaData.getMetadataType
Gabriele Cardosi (Jira)
issues at jboss.org
Fri Feb 22 05:38:00 EST 2019
Gabriele Cardosi created DROOLS-3688:
----------------------------------------
Summary: Implement usage of ScenarioHeaderMetaData.getMetadataType
Key: DROOLS-3688
URL: https://issues.jboss.org/browse/DROOLS-3688
Project: Drools
Issue Type: Enhancement
Reporter: Gabriele Cardosi
Assignee: Anna Baker
Inside _ScenarioHeaderMetaData_ there are two flags, _instanceHeader_ and _propertyHeader_, used all over the client code to drive code execution.
A new enum has been created, _ScenarioHeaderMetaData.MetadataType_, and a specific property/getter, _ScenarioHeaderMetaData.getMetadataType()_.
Replace everywhere (with the exception for single line checks) the usage of _ScenarioHeaderMetaData.isInstanceHeader()_ and _ScenarioHeaderMetaData.isPropertyHeader()_ with _ScenarioHeaderMetaData.getMetadataType()_, and adapt the code to use that enum instead of the boolean.
That should remove all the "if" with a more robust and readable "switch"
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list