Ignore:
Timestamp:
2017-07-30T17:07:42+02:00 (2 years ago)
Author:
Don-vip
Message:

partial revert of r12537

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

Legend:

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

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

    r12537 r12542  
    5151
    5252    private final String sender;
    53     private static final Set<String> TRUSTED_SENDERS = new HashSet<>();
     53    private static final Set<String> trustedSenders = 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() && !TRUSTED_SENDERS.contains(sender)) {
     229        if (!sender.isEmpty() && !trustedSenders.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                         TRUSTED_SENDERS.add(sender);
     234                        trustedSenders.add(sender);
    235235                    else
    236                         TRUSTED_SENDERS.remove(sender);
     236                        trustedSenders.remove(sender);
    237237                }
    238238            });
     
    263263        }
    264264        if (buttonIndex == 2) {
    265             TRUSTED_SENDERS.remove(sender);
     265            trustedSenders.remove(sender);
    266266        }
    267267        setVisible(false);
     
    308308     */
    309309    public static void addTags(String[][] keyValue, String sender, Collection<? extends OsmPrimitive> primitives) {
    310         if (TRUSTED_SENDERS.contains(sender)) {
     310        if (trustedSenders.contains(sender)) {
    311311            if (Main.getLayerManager().getEditDataSet() != null) {
    312312                for (String[] row : keyValue) {
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

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