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

Velocity templates should be called for ascenedant primary types #484

Closed
wants to merge 12 commits into from
Closed

Velocity templates should be called for ascenedant primary types #484

wants to merge 12 commits into from

Conversation

nikhiltri
Copy link
Contributor

boolean templateFound = false;
for (NodeType superType : primaryNodeType.getSupertypes()) {
// for each node primary type, we try to find a template
templateLocation =
Copy link

Choose a reason for hiding this comment

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

Refactor much of this code block into a new private method that can be called here and in line:145

Copy link
Contributor

Choose a reason for hiding this comment

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

And please strongly consider using the more concise and understandable Guava [Iterables.getFirst()](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/Iterables.html#getFirst%28java.lang.Iterable, T%29).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since I'm refactoring this code to only be called once, shall I just keep it in-line?

Copy link
Contributor

Choose a reason for hiding this comment

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

You're going to need to call it inside of a Predicate, but then call it again once you know which mixin on which to rely, so I would factor it out anyway.

@bseeger
Copy link
Contributor

bseeger commented Nov 6, 2015

Hello @nikhiltri and @awoods,
We're cleaning up the fcrepo4 repository on github. It looks like this PR may have been replaced by: #592

If this PR is no longer necessary, could one of you please close it?

If we don't hear from you by November 20th, 2015, we'll close this for you.

Thank you!

@awoods
Copy link

awoods commented Nov 9, 2015

Closed due to age of PR. ...and this issue was resolved with a different PR.

@awoods awoods closed this Nov 9, 2015
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

5 participants