Ignore:
Timestamp:
2017-07-30T00:22:46+02:00 (2 years ago)
Author:
Don-vip
Message:

PMD - VariableNamingConventions

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java

    r12279 r12537  
    4141     * We therefore read the property at class loading time and remember it's value.
    4242     */
    43     private static boolean JVM_WILL_USE_SYSTEM_PROXIES;
     43    private static boolean jvmWillUseSystemProxies;
    4444    static {
    4545        String v = System.getProperty("java.net.useSystemProxies");
    4646        if (v != null && v.equals(Boolean.TRUE.toString())) {
    47             JVM_WILL_USE_SYSTEM_PROXIES = true;
     47            jvmWillUseSystemProxies = true;
    4848        }
    4949    }
     
    5959     */
    6060    public static boolean willJvmRetrieveSystemProxies() {
    61         return JVM_WILL_USE_SYSTEM_PROXIES;
     61        return jvmWillUseSystemProxies;
    6262    }
    6363
     
    202202        switch(proxyPolicy) {
    203203        case USE_SYSTEM_SETTINGS:
    204             if (!JVM_WILL_USE_SYSTEM_PROXIES) {
     204            if (!jvmWillUseSystemProxies) {
    205205                Main.warn(tr("The JVM is not configured to lookup proxies from the system settings. "+
    206206                        "The property ''java.net.useSystemProxies'' was missing at startup time.  Will not use a proxy."));
  • trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java

    r12439 r12537  
    4545    private final OsmDataLayer layer;
    4646    private final Projection projection;
    47     private static final boolean skipEmptyNodes = true;
     47    private static final boolean SKIP_EMPTY_NODES = true;
    4848
    4949    /**
     
    165165        if (p.isIncomplete()) {
    166166            return;
    167         } else if (skipEmptyNodes && p instanceof Node && p.getKeys().isEmpty()) {
     167        } else if (SKIP_EMPTY_NODES && p instanceof Node && p.getKeys().isEmpty()) {
    168168            return;
    169169        }
  • trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java

    r11987 r12537  
    9999    static final Pattern OUTPUT_FORMAT_STATEMENT = Pattern.compile(".*\\[out:([a-z]{3,})\\].*", Pattern.DOTALL);
    100100
    101     static final Map<OverpassOutpoutFormat, Class<? extends AbstractReader>> outputFormatReaders = new ConcurrentHashMap<>();
     101    static final Map<OverpassOutpoutFormat, Class<? extends AbstractReader>> OUTPUT_FORMAT_READERS = new ConcurrentHashMap<>();
    102102
    103103    final String overpassServer;
     
    125125    public static final Class<? extends AbstractReader> registerOverpassOutpoutFormatReader(
    126126            OverpassOutpoutFormat format, Class<? extends AbstractReader> readerClass) {
    127         return outputFormatReaders.put(Objects.requireNonNull(format), Objects.requireNonNull(readerClass));
     127        return OUTPUT_FORMAT_READERS.put(Objects.requireNonNull(format), Objects.requireNonNull(readerClass));
    128128    }
    129129
     
    232232        Matcher m = OUTPUT_FORMAT_STATEMENT.matcher(overpassQuery);
    233233        if (m.matches()) {
    234             Class<? extends AbstractReader> readerClass = outputFormatReaders.get(OverpassOutpoutFormat.from(m.group(1)));
     234            Class<? extends AbstractReader> readerClass = OUTPUT_FORMAT_READERS.get(OverpassOutpoutFormat.from(m.group(1)));
    235235            if (readerClass != null) {
    236236                try {
  • trunk/src/org/openstreetmap/josm/io/XmlWriter.java

    r9828 r12537  
    6262                String encS = null;
    6363                if (!keepApos || unencoded.charAt(i) != '\'') {
    64                     encS = XmlWriter.encoding.get(unencoded.charAt(i));
     64                    encS = ENCODING.get(unencoded.charAt(i));
    6565                }
    6666                if (encS != null) {
     
    8080     * The output writer to save the values to.
    8181     */
    82     private static final Map<Character, String> encoding = new HashMap<>();
     82    private static final Map<Character, String> ENCODING = new HashMap<>();
    8383    static {
    84         encoding.put('<', "&lt;");
    85         encoding.put('>', "&gt;");
    86         encoding.put('"', "&quot;");
    87         encoding.put('\'', "&apos;");
    88         encoding.put('&', "&amp;");
    89         encoding.put('\n', "&#xA;");
    90         encoding.put('\r', "&#xD;");
    91         encoding.put('\t', "&#x9;");
     84        ENCODING.put('<', "&lt;");
     85        ENCODING.put('>', "&gt;");
     86        ENCODING.put('"', "&quot;");
     87        ENCODING.put('\'', "&apos;");
     88        ENCODING.put('&', "&amp;");
     89        ENCODING.put('\n', "&#xA;");
     90        ENCODING.put('\r', "&#xD;");
     91        ENCODING.put('\t', "&#x9;");
    9292    }
    9393
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r12523 r12537  
    5151
    5252    private final String sender;
    53     private static final Set<String> trustedSenders = new HashSet<>();
     53    private static final Set<String> TRUSTED_SENDERS = new HashSet<>();
    5454
    5555    static final class PropertyTableModel extends DefaultTableModel {
     
    227227        tablePanel.add(propertyTable.getTableHeader(), GBC.eol().fill(GBC.HORIZONTAL));
    228228        tablePanel.add(propertyTable, GBC.eol().fill(GBC.BOTH));
    229         if (!sender.isEmpty() && !trustedSenders.contains(sender)) {
     229        if (!sender.isEmpty() && !TRUSTED_SENDERS.contains(sender)) {
    230230            final JCheckBox c = new JCheckBox();
    231231            c.setAction(new AbstractAction(tr("Accept all tags from {0} for this session", sender)) {
    232232                @Override public void actionPerformed(ActionEvent e) {
    233233                    if (c.isSelected())
    234                         trustedSenders.add(sender);
     234                        TRUSTED_SENDERS.add(sender);
    235235                    else
    236                         trustedSenders.remove(sender);
     236                        TRUSTED_SENDERS.remove(sender);
    237237                }
    238238            });
     
    263263        }
    264264        if (buttonIndex == 2) {
    265             trustedSenders.remove(sender);
     265            TRUSTED_SENDERS.remove(sender);
    266266        }
    267267        setVisible(false);
     
    308308     */
    309309    public static void addTags(String[][] keyValue, String sender, Collection<? extends OsmPrimitive> primitives) {
    310         if (trustedSenders.contains(sender)) {
     310        if (TRUSTED_SENDERS.contains(sender)) {
    311311            if (Main.getLayerManager().getEditDataSet() != null) {
    312312                for (String[] row : keyValue) {
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

    r12489 r12537  
    147147    }
    148148
    149     private static final Map<String, Class<? extends SessionLayerImporter>> sessionLayerImporters = new HashMap<>();
     149    private static final Map<String, Class<? extends SessionLayerImporter>> SESSION_LAYER_IMPORTERS = new HashMap<>();
    150150
    151151    private URI sessionFileURI;
     
    174174     */
    175175    public static void registerSessionLayerImporter(String layerType, Class<? extends SessionLayerImporter> importer) {
    176         sessionLayerImporters.put(layerType, importer);
     176        SESSION_LAYER_IMPORTERS.put(layerType, importer);
    177177    }
    178178
     
    183183     */
    184184    public static SessionLayerImporter getSessionLayerImporter(String layerType) {
    185         Class<? extends SessionLayerImporter> importerClass = sessionLayerImporters.get(layerType);
     185        Class<? extends SessionLayerImporter> importerClass = SESSION_LAYER_IMPORTERS.get(layerType);
    186186        if (importerClass == null)
    187187            return null;
Note: See TracChangeset for help on using the changeset viewer.