New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DROOLS-4969: Fixed broken tests after merge of DROOLS-4969 #1303
Conversation
@@ -210,8 +210,7 @@ protected CompositeTypeImpl getSingleCompositeWithNestedCollection() { | |||
*/ | |||
protected CompositeTypeImpl getCompositeCollection() { | |||
// Complex object retrieve | |||
CompositeTypeImpl toReturn = new CompositeTypeImpl("compositeNameSpace", COMPOSITE_TYPE_NAME, null); | |||
toReturn.setCollection(true); | |||
CompositeTypeImpl toReturn = new CompositeTypeImpl("compositeNameSpace", COMPOSITE_TYPE_NAME, null, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -210,8 +210,7 @@ protected CompositeTypeImpl getSingleCompositeWithNestedCollection() { | |||
*/ | |||
protected CompositeTypeImpl getCompositeCollection() { | |||
// Complex object retrieve | |||
CompositeTypeImpl toReturn = new CompositeTypeImpl("compositeNameSpace", COMPOSITE_TYPE_NAME, null); | |||
toReturn.setCollection(true); | |||
CompositeTypeImpl toReturn = new CompositeTypeImpl("compositeNameSpace", COMPOSITE_TYPE_NAME, null, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me personally would implement as:
final boolean isCollection = true;
CompositeTypeImpl toReturn = new CompositeTypeImpl("compositeNameSpace", COMPOSITE_TYPE_NAME, null, isCollection);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving, but the readability is decreased due to big amount of parameters in that constructor. I would use variables to demonstrate what are passed values used for. However I am not going to block this PR. Decide if you want to incorporate.
Thank you.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@danielezonca @jomarko @tarilabs
Considering the changes https://github.com/kiegroup/drools/pull/2741,
isCollection
boolean must be passed to the constructor ofCompositeTypeImpl
, because it's now used to determine the object behavior. UsingsetCollection()
method leads to the issue. (It should be handled or, even better, removed)