Skip to content
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

Merged
merged 1 commit into from Feb 6, 2020

Conversation

yesamer
Copy link
Member

@yesamer yesamer commented Feb 6, 2020

@danielezonca @jomarko @tarilabs
Considering the changes https://github.com/kiegroup/drools/pull/2741, isCollection boolean must be passed to the constructor of CompositeTypeImpl, because it's now used to determine the object behavior. Using setCollection() method leads to the issue. (It should be handled or, even better, removed)

@@ -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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@yesamer yesamer marked this pull request as ready for review February 6, 2020 13:04
@@ -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);
Copy link

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);

Copy link

@jomarko jomarko left a 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.

@sonarcloud
Copy link

sonarcloud bot commented Feb 6, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@danielezonca danielezonca merged commit c8c63ad into kiegroup:master Feb 6, 2020
@yesamer yesamer deleted the DROOLS-4969 branch February 10, 2020 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants