gitgabrio commented on PR #5672: URL: https://github.com/apache/incubator-kie-drools/pull/5672#issuecomment-1935637449
Hi @jmreardon-yoppworks Firtst of all, thatnks again for your PR and your analysys on that. I'm looking at your modification, and I agree with your observations about actual usage of the generated exception. But, here's my small concerns. On one side, the definition of the class clearly define the semantic of the `valueResult` as `Either<Exception, Object>` On the other side, this modification would introduce a small inconsistency, i.e. in some cases the `getDefinedValue` would return an` Either of righ(null) `, and in other cases an `Either of left (Exception)`. Moreover, those methods are `public static`, so maybe used elsewhere, with the defined semantic. What if, instead, we use a singleton of the `UnsupportedOperationException`, so that 1. the semantic of the class is preserved 2. the exception is created only once, so it should reduce the overall impact Wdyt ? FYI @baldimir @yesamer -- 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]
