Skip to content

throw exception with details in InteropServiceImpl (FINERACT-860)#728

Merged
awasum merged 1 commit intoapache:developfrom
vorburger:FINERACT-860_NoSuchElementException
Mar 10, 2020
Merged

throw exception with details in InteropServiceImpl (FINERACT-860)#728
awasum merged 1 commit intoapache:developfrom
vorburger:FINERACT-860_NoSuchElementException

Conversation

@vorburger
Copy link
Copy Markdown
Member

@vorburger vorburger commented Mar 8, 2020

instead of the NoSuchElementException from Optional.get(), we're now
throwing an UnsupportedOperationException which includes the details of
the missing object. (This kind of detailed exception was already thrown
in two existing places in the same code after a null check, but it never
reached there, because the Optional.get() failed earlier. Another
option would have been to return null for an absent Optional, but this
is better.)

The other unrelated changes are automatic clean up actions (in Eclipse).

see https://issues.apache.org/jira/projects/FINERACT/issues/FINERACT-860

instead of the NoSuchElementException from Optional.get(), we're now
throwing an UnsupportedOperationException which includes the details of
the missing object.  (This kind of detailed exception was already thrown
in two existing places in the same code after a null check, but it never
reached there, because the Optional.get() failed earlier.  Another
option would have been to return null for an absent Optional, but this
is better.)

The other unrelated changes are automatic clean up actions (in Eclipse).
@vorburger vorburger requested a review from awasum March 10, 2020 10:33
@vorburger
Copy link
Copy Markdown
Member Author

@awasum want to review this one? See the JIRA for some background.

Copy link
Copy Markdown
Contributor

@awasum awasum left a comment

Choose a reason for hiding this comment

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

LGTM. Merging now. Thanks @vorburger

@awasum awasum merged commit 0c9273a into apache:develop Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants