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

JBIDE-20568 Duplicate templates in different OpenShift projects are not distinguishable from each other #1010

Closed
wants to merge 1 commit into from

Conversation

scabanovich
Copy link
Contributor

No description provided.

@@ -204,7 +204,14 @@ public Object visit(ITags capability) {
return NLS.bind("({0})", org.apache.commons.lang.StringUtils.join(capability.getTags(), ", "));
}
}, null);
return style(template.getName(), tags);
StringBuilder qualifier = new StringBuilder();
if(!StringUtils.isEmpty(tags)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Depending upon if this StringUtils is from apache commons, there is an 'isNotEmpty' method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I am late to reply.

There is comparable number of usages in openshift of org.apache.commons.lang.StringUtils.isBlank(+isEmpty+isNotBlank+isNotEmpty) and org.jboss.tools.openshift.common.core.utils.StringUtils.isEmpty (the last one takes some lead). I would not mind to change to apache commons since it is already used in this file.

By the way, this file contains for the same property two different calls:

  • org.apache.commons.lang.StringUtils.isNotEmpty(project.getDisplayName()) in getText(Object)
  • org.apache.commons.lang.StringUtils.isNotBlank(project.getDisplayName()) in getStyledText(IProject)

Should we revise usage of these two methods to make it consistent?

Also, maybe we may implement org.jboss.tools.openshift.common.core.utils.StringUtils.isEmpty with org.apache.commons.lang.StringUtils.isEmpty to make it formally of no matter which one to use.

@jcantrill, @adietish, what do you think?

@jcantrill
Copy link
Contributor

other then my one comment LGTM

@adietish
Copy link
Member

adietish commented Mar 7, 2016

looks good, thanks!

@adietish
Copy link
Member

adietish commented Mar 7, 2016

rebased and merged into master, cherry-picked into jbosstools-4.3.x

@adietish adietish closed this Mar 7, 2016
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