Skip to content

Conversation

@dgomezg
Copy link
Contributor

@dgomezg dgomezg commented Jul 23, 2019

Both getEntry(entryId) and deleteEntry(entryId) return the entity by its ID or throw a PortalException
if the entity with the provided Id does not exists in the persistence layer. So, the call to getEntry is redundant.
The method implementation could have been simplified to one-line: return deleteEntry(entryId), but
I keep the assigment to make it more clear that deleteEntry() method is returning the Entry.

Both getEntry(entryId) and deleteEntry(entryId) return the entity by its ID or throw a PortalException
if the entity with the provided Id does not exists in the persistence layer. So, the first call is redundant.
The method implementation could have been simplified to one-line: return deleteEntry(entryId), but
I keep the assigment to make it more clear that deleteEntry() method is returning the Entry.
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