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

Fix IllegalStateException: No logical node selected! #5993

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthias-ronge
Copy link
Collaborator

Exception occurs when opening Metadata Editor, because calling method expects null in no-data case, but receives IllegalStateException:

Stacktrace

Copy link
Member

Choose a reason for hiding this comment

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

I think this can potentially create a NullPointerException because the result of DataEditorService.getStructuralElementView is also passed as last parameter to ProcessService.findLinkableChildProcesses where .contains is called on it without a null-check:

if (allowedStructuralElementTypes.contains(getBaseType(process.getId()))) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, because allowedSubstructuralElements is the result of Map.keySet() which cannot be null.

BTW, this is not the problem here. The problem was that the calling method expects null in case there is nothing (and there are severeal more correct return null; statements below in getStructuralElementView()), but in this one place the function throws an IllegalStateException instead of returning null.

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.

None yet

2 participants