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

Eliminate dead code #606

Merged
merged 5 commits into from Oct 30, 2014
Merged

Eliminate dead code #606

merged 5 commits into from Oct 30, 2014

Conversation

barmintor
Copy link
Contributor

Part of a review of the codebase to eliminate unused code

protected Node findNode(final Session session, final String path) {
try {
// Remove leading and trailing slashes ...
final String relPath = path.replaceAll("^/+", "").replaceAll("/+$", "");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be simplified to just:

session.getNode(path)

No? I think you might have been confused by the findAndCreate logic, which has to build up the whole tree to the object to find out where to start building nodes from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, commit incoming.

@awoods
Copy link

awoods commented Oct 30, 2014

@barmintor, please add the @SInCE annotation noted in the code comments, then feel free to squash the commits:
f87f3cc and
e9126bc
into their appropriate earlier commits... or I can do it for you.
Otherwise, this is ready to go.

awoods pushed a commit that referenced this pull request Oct 30, 2014
@awoods awoods merged commit d62c1fc into master Oct 30, 2014
@awoods awoods deleted the 80959252 branch October 30, 2014 17:43
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.

None yet

3 participants