-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[scale] NPE in ScaleTransformationService #8124
Conversation
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Travis tests were successfulHey @DerOetzi, |
@@ -129,7 +129,7 @@ private String formatResult(Map<Range, String> data, String source, final BigDec | |||
|
|||
private String getScaleResult(Map<Range, String> data, String source, final BigDecimal value) | |||
throws TransformationException { | |||
return data.entrySet().stream().filter(entry -> entry.getKey().contains(value)).findFirst() | |||
return data.entrySet().stream().filter(entry -> entry.getKey() != null && entry.getKey().contains(value)).findFirst() |
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.
Are you sure that the null value is the entry.getKey())
? I'd thin it is actually the result of the filter(...)
call and thus the findFirst()
call causes the NPE.
The key is Line 167 in 1ad2d6a
|
Oh, pretty unexpected, but thanks for pointing this out! Then the fix should be alright, I guess. |
But I leave the final decision & merge to you, @J-N-K as you already helped on the investigation. |
I can't judge whether adding |
@cpmeister and @clinique you had comments on this at #8013 can you please have a look! |
Signed-off-by: Johannes DerOetzi Ott <[email protected]>t> Signed-off-by: CSchlipp <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>t> Signed-off-by: MPH80 <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>t>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>t>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>t>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>t>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>t> Signed-off-by: Daan Meijer <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>t>
Fix #8011 and #8123
Signed-off-by: Johannes DerOetzi Ott [email protected]