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

[DOOLS-1062] test case + proposed fix #644

Closed
wants to merge 2 commits into from

Conversation

psiroky
Copy link
Contributor

@psiroky psiroky commented Feb 13, 2016

@mariofusco, @ge0ffrey this PR contains the test case from #643 and suggested fix in MemoryKieModule.

With these changes, those two failing optaplanner tests are now passing.

@@ -167,7 +167,7 @@ public boolean existsFolder(MemoryFolder folder) {
}

public boolean existsFolder(String path) {
return folders.get( path ) != null;
return folders.get( path.length() > 0 ? MemoryFolder.trimLeadingAndTrailing( path ) : path ) != null;
Copy link
Contributor

Choose a reason for hiding this comment

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

NPE is lurking here. Are we 100 % sure path != null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the method is public we can never be sure. I don't know what caller could expect passing null (NPE?), but there should be no harm adding one more null check there.

@psiroky psiroky force-pushed the drools-1062-get-resources branch from 1fbf66f to 32c82be Compare February 13, 2016 23:43
@ge0ffrey
Copy link
Contributor

+1 (only reviewed the tests)

@mariofusco
Copy link
Contributor

Merged by 55d6445e1

@mariofusco mariofusco closed this Feb 15, 2016
@psiroky psiroky deleted the drools-1062-get-resources branch February 15, 2016 08:59
dupliaka pushed a commit to dupliaka/drools that referenced this pull request Apr 1, 2022
cimbalek pushed a commit to cimbalek/incubator-kie-drools that referenced this pull request Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants