Copilot commented on code in PR #6299:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6299#discussion_r2063608967


##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/TimeFunction.java:
##########
@@ -181,4 +181,11 @@ protected FEELFnResult<TemporalAccessor> 
manageDateTimeException(DateTimeExcepti
         return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, 
"from", e));
     }
 
+    private FEELFnResult<TemporalAccessor> checkParamIfNull(String paramName, 
Number value) {
+        if (NumberEvalHelper.coerceIntegerNumber(value) == null) {

Review Comment:
   The checkParamIfNull method incorrectly checks for null on an Optional, 
which is never null. Instead, use isEmpty() to verify whether the Optional 
contains a value.
   ```suggestion
           if (NumberEvalHelper.coerceIntegerNumber(value).isEmpty()) {
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to