Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed getEntry method call in deleteEntry method impl #528

Open
wants to merge 1 commit into
base: 7.1.x
Choose a base branch
from

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