Skip to content

Conversation

dirk-olmes
Copy link
Contributor

@dirk-olmes dirk-olmes commented Dec 6, 2024

related to #85

@kthoms kthoms self-requested a review December 6, 2024 08:05
@@ -63,8 +63,8 @@ public Object invoke(InvocationContext ctx) throws Exception {
return result;
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
if(cause != null && cause instanceof Exception) {
throw (Exception) cause;
if (cause != null && cause instanceof Exception exception) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question on how to proceed here: A user commented on a commit some time earlier, that instanceof is null safe. If the passed parameter is null, it is not an instance of Exception and the check is false, skipping the body. Is this something we should already improve here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://docs.oracle.com/javase/specs/jls/se17/html/jls-15.html#jls-15.20.2

At run time, the result of the type comparison operator is determined as follows:

If the value of the RelationalExpression is the null reference (§4.1), then the result is false.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the null check is obsolete then

- Syntax fix in DateDataTypeTransformer
- remove redundant null check in StartProcessInterceptor
@kthoms kthoms merged commit 41d7bd5 into operaton:main Dec 11, 2024
2 checks passed
@kthoms
Copy link
Contributor

kthoms commented Dec 11, 2024

Sorry @dirk-olmes I did not recognize that the findings have already been adressed for a long time. Just ping in a comment. Did you know that you could (re-)request a review when clicking on one of the reviewers in top right?

Copy link
Contributor

🎉 This issue has been resolved in v1.0.0-beta-3 (Release Notes)

@github-actions github-actions bot added the released Issue has been released label Jan 31, 2025
@kthoms kthoms added this to the 1.0.0-beta-3 milestone May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Issue has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants