Copilot commented on code in PR #10998:
URL: https://github.com/apache/cloudstack/pull/10998#discussion_r2137710205
##########
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java:
##########
@@ -1326,6 +1314,18 @@ protected String validateConfigurationValue(final String
name, String value, fin
}
}
+ if (type.equals(Double.class)) {
+ try {
+ final Double val = Double.parseDouble(value);
+ if (weightBasedParametersForValidation.contains(name) && (val
< 0f || val > 1f)) {
Review Comment:
Consider using double literals (0.0 and 1.0) instead of float literals (0f
and 1f) for clarity when comparing Double values.
```suggestion
if (weightBasedParametersForValidation.contains(name) &&
(val < 0.0 || val > 1.0)) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]