Changeset 17793 in josm for trunk/src


Ignore:
Timestamp:
2021-04-19T19:03:32+02:00 (4 years ago)
Author:
simon04
Message:

Fix PMD Warnings

Location:
trunk/src/org/openstreetmap/josm
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java

    r17700 r17793  
    130130
    131131        for (String name : Arrays.asList("LANG", "LC_ALL")) {
    132             String value = Utils.getSystemEnv(name);
     132            String value = getSystemEnv(name);
    133133            if (value != null) {
    134134                text.format("Environment variable %s: %s%n", name, value);
     
    136136        }
    137137        for (String name : Arrays.asList("file.encoding", "sun.jnu.encoding")) {
    138             String value = Utils.getSystemProperty(name);
     138            String value = getSystemProperty(name);
    139139            if (value != null) {
    140140                text.format("System property %s: %s%n", name, value);
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r17786 r17793  
    370370     */
    371371    public static void askUpdateJava(String updVersion, String url, String eolDate, boolean major) {
    372         StringBuilder content = new StringBuilder(tr("You are running version {0} of Java.",
     372        StringBuilder content = new StringBuilder(256);
     373        content.append(tr("You are running version {0} of Java.",
    373374                "<b>"+getSystemProperty("java.version")+"</b>")).append("<br><br>");
    374375        if ("Sun Microsystems Inc.".equals(getSystemProperty("java.vendor")) && !PlatformManager.getPlatform().isOpenJDK()) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java

    r17783 r17793  
    10131013    public void zoomBestFitOrOne() {
    10141014        ImageEntry entry;
    1015         ImageEntry oldEntry;
    10161015        Image image;
    10171016        VisRect visibleRect;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/DividedScale.java

    r17582 r17793  
    156156     */
    157157    public void consistencyTest() {
    158         if (ranges.size() < 1) throw new AssertionError(ranges);
     158        if (ranges.isEmpty()) throw new AssertionError(ranges);
    159159        if (data.isEmpty()) throw new AssertionError(data);
    160160        if (ranges.size() != data.size()) throw new AssertionError();
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java

    r17785 r17793  
    1010import java.awt.event.MouseAdapter;
    1111import java.awt.event.MouseEvent;
    12 import java.util.Collections;
    1312import java.util.HashSet;
    1413import java.util.List;
     
    4443
    4544    /** Whether the plugin list has been built up already in the UI. */
    46     private boolean pluginListInitialized = false;
     45    private boolean pluginListInitialized;
    4746
    4847    /**
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java

    r17713 r17793  
    239239    }
    240240
    241     public void setValue_template(String pattern) throws SAXException {
     241    public void setValue_template(String pattern) throws SAXException { // NOPMD
    242242        try {
    243243            this.valueTemplate = new TemplateParser(pattern).parse();
     
    250250    private void setupListeners(AutoCompletingTextField textField, TaggingPresetItemGuiSupport support) {
    251251        textField.getDocument().addDocumentListener(DocumentAdapter.create(ignore ->
    252                 support.fireItemValueModified(Text.this, key, textField.getText())));
     252                support.fireItemValueModified(this, key, textField.getText())));
    253253
    254254        if (valueTemplate != null) {
Note: See TracChangeset for help on using the changeset viewer.