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
[WFCORE-5520] Avoid Nullpointer (Remoting) #4695
[WFCORE-5520] Avoid Nullpointer (Remoting) #4695
Conversation
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.
connectorPropertiesOptionMap
is also used similarly on L179, if finally this change is accepted, the if sentence on L179 should be modified accordingly.
e71dead
to
5a659c8
Compare
Core - Full Integration Build 10917 outcome was FAILURE using a merge of 5a659c8 Failed tests
|
@yersan thanks for your feedback. I have changed the PR accordingly. Please check again. |
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.
Hello @boris-unckel , looking more carefully at the source code, I don't believe that we are going to have a connectorPropertiesOptionMap
as null
in this piece of code. All the callers pass a non-null value.
In any case, preventing for null is fine and there is an if around L152 that does that. Instead of adding a repetitive null check for the same instance as you did on your changes, what about replacing the uses of connectorPropertiesOptionMap
with resultingMap
after the initial null check on L152 and avoid the repetitive null checks? What do you think?
If connectorPropertiesOptionMap
is not null, then resultingMap
will contain their values. If connectorPropertiesOptionMap
is null, then resultingMap
will be empty, so there is no need for further null checks. It seems that would make the code cleaner and will avoid repeating check if connectorPropertiesOptionMap
when it is used along with this method.
5a659c8
to
22f20ac
Compare
Hello @yersan please have a look at this version. It relies on |
Sorry @boris-unckel , this PR can be closed, we have been working on a piece of code that was going to be removed, see #4716 |
@yersan Anyway no problem anymore. Thanks for your ongoing support. 👍 |
Fixes https://issues.redhat.com/browse/WFCORE-5520