-
Notifications
You must be signed in to change notification settings - Fork 0
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
remove generic computation classes #117
Conversation
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
return Map.of( | ||
HEADER_LIMIT_REDUCTION, | ||
runContext.getLimitReduction() != null ? | ||
runContext.getLimitReduction().toString() : | ||
getRunContext().getLimitReduction() != null ? |
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.
Passing 'null' argument to parameter annotated as @NotNull
if (getRunContext().getLimitReduction() != null) {
return Map.of(HEADER_LIMIT_REDUCTION, getRunContext().getLimitReduction());
} else {
return super.getSpecificMsgHeaders();
}
Not really related but in line 48 and 51, using test by headers.containsKey() is not enough, the value can be null, pls correct line 48 and 51 as following way:
String limitReductionStr = headers.get(HEADER_LIMIT_REDUCTION);
Float limitReduction = limitReductionStr != null ? Float.parseFloat(limitReductionStr) : null
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.
Done. Damn null parameters in map.of won't get me again.
@@ -66,11 +66,11 @@ public static LoadFlowResultContext fromMessage(Message<String> message, ObjectM | |||
} | |||
|
|||
@Override | |||
protected Map<String, String> getSpecificMsgHeaders() { | |||
protected Map<String, Object> getSpecificMsgHeaders() { |
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.
Why using Map<String, Object> instead of Map<String, String> (from AbstractResultContext)
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.
Leftover of the voltage init parsing mixup. Reverted. And ObjectMapper added.
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
…es' into remove-generic-computation-classes
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Quality Gate failedFailed conditions |
Now those classes will be in ws-commons