Skip to content

Commit

Permalink
fix PMD
Browse files Browse the repository at this point in the history
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19300 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
stoecker committed Jan 28, 2025
1 parent 5139b5e commit 1edf2ee
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,14 @@ private static class ColorEntry {
* @return a description of the color
*/
public String getDisplay() {
switch (info.getCategory()) {
case NamedColorProperty.COLOR_CATEGORY_MAPPAINT:
if (info.getSource() != null)
return tr("Paint style {0}: {1}", tr(I18n.escape(info.getSource())), tr(info.getName()));
// fall through
default:
if (info.getSource() != null)
return tr(I18n.escape(info.getSource())) + " - " + tr(I18n.escape(info.getName()));
else
return tr(I18n.escape(info.getName()));
if (info.getSource() != null) {
if (info.getCategory() == NamedColorProperty.COLOR_CATEGORY_MAPPAINT)
return tr("Paint style {0}: {1}", tr(I18n.escape(info.getSource())), tr(info.getName()));
else
return tr(I18n.escape(info.getSource())) + " - " + tr(I18n.escape(info.getName()));
}

Check failure on line 118 in src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java

View workflow job for this annotation

GitHub Actions / Analyze

com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck

'}' at column 13 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).
else
return tr(I18n.escape(info.getName()));
}

/**
Expand Down

0 comments on commit 1edf2ee

Please sign in to comment.