Skip to content
Snippets Groups Projects
Commit 5b396e7e authored by felmer's avatar felmer
Browse files

Fix bug in VocabularyTerm rendering. Code duplication refactored

SVN: 13524
parent 3bed045d
No related branches found
No related tags found
No related merge requests found
......@@ -72,15 +72,7 @@ public class VocabularyPropertyColRenderer<T extends IEntityPropertiesHolder> ex
public static final String renderCodeWithLabel(VocabularyTerm term)
{
final String code = term.getCode();
final String label = term.getLabel();
if (label == null)
{
return code;
} else
{
return label + " [" + code + "]";
}
return term.toString();
}
public static final String renderAsTooltip(VocabularyTerm term)
......
......@@ -84,13 +84,8 @@ public final class VocabularyTerm extends CodeWithRegistration<Vocabulary> imple
@Override
public String toString()
{
if (label == null)
{
return getCode();
} else
{
return label + " [" + getCode() + "]";
}
String code = getCode();
return label == null ? code : (code == null ? label : label + " [" + code + "]");
}
public String getUrl()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment