Changeset 6310 in josm for trunk


Ignore:
Timestamp:
2013-10-07T00:04:48+02:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/FindBugs - Nested blocks of code should not be left empty

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

Legend:

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

    r6084 r6310  
    105105                        });
    106106                    } catch (InterruptedException ex) {
     107                        Main.warn(ex);
    107108                    } catch (InvocationTargetException ex) {
     109                        Main.warn(ex);
    108110                    }
    109111                }
  • trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java

    r6296 r6310  
    1212import javax.swing.filechooser.FileFilter;
    1313
     14import org.openstreetmap.josm.Main;
    1415import org.openstreetmap.josm.gui.MapView;
    1516import org.openstreetmap.josm.io.AllFormatsImporter;
     
    6263                importers.add(importer);
    6364                MapView.addLayerChangeListener(importer);
    64             } catch (Throwable t) { }
     65            } catch (Throwable t) {
     66                Main.debug(t.getMessage());
     67            }
    6568        }
    6669
     
    8184                exporters.add(exporter);
    8285                MapView.addLayerChangeListener(exporter);
    83             } catch (Throwable t) { }
     86            } catch (Throwable t) {
     87                Main.debug(t.getMessage());
     88            }
    8489        }
    8590    }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r6296 r6310  
    243243            Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.KEY_EVENT_MASK);
    244244        } catch (SecurityException ex) {
     245            Main.warn(ex);
    245246        }
    246247        // would like to but haven't got mouse position yet:
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r6252 r6310  
    206206            Toolkit.getDefaultToolkit().addAWTEventListener(altKeyListener, AWTEvent.KEY_EVENT_MASK);
    207207        } catch (SecurityException ex) {
     208            Main.warn(ex);
    208209        }
    209210        initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay",200);
     
    228229            Toolkit.getDefaultToolkit().removeAWTEventListener(altKeyListener);
    229230        } catch (SecurityException ex) {
     231            Main.warn(ex);
    230232        }
    231233        super.exitMode();
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java

    r6296 r6310  
    150150                    AWTEvent.KEY_EVENT_MASK);
    151151        } catch (SecurityException ex) {
     152            Main.warn(ex);
    152153        }
    153154    }
     
    165166            Toolkit.getDefaultToolkit().removeAWTEventListener(this);
    166167        } catch (SecurityException ex) {
     168            Main.warn(ex);
    167169        }
    168170
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r6265 r6310  
    163163            Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.KEY_EVENT_MASK);
    164164        } catch (SecurityException ex) {
     165            Main.warn(ex);
    165166        }
    166167        sourceWays = new LinkedHashSet<Way>(getCurrentDataSet().getSelectedWays());
     
    182183            Toolkit.getDefaultToolkit().removeAWTEventListener(this);
    183184        } catch (SecurityException ex) {
     185            Main.warn(ex);
    184186        }
    185187        removeWayHighlighting(sourceWays);
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r6296 r6310  
    191191        try {
    192192            Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.KEY_EVENT_MASK);
    193         } catch (SecurityException ex) {}
     193        } catch (SecurityException ex) {
     194            Main.warn(ex);
     195        }
    194196    }
    195197
     
    203205        try {
    204206            Toolkit.getDefaultToolkit().removeAWTEventListener(this);
    205         } catch (SecurityException ex) {}
     207        } catch (SecurityException ex) {
     208            Main.warn(ex);
     209        }
    206210        removeHighlighting();
    207211    }
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r6296 r6310  
    335335                try { // proceed only after all other tasks were finished
    336336                    while (busy) CustomConfigurator.class.wait();
    337                 } catch (InterruptedException ex) { }
     337                } catch (InterruptedException ex) {
     338                    Main.warn(ex);
     339                }
    338340
    339341                SwingUtilities.invokeLater(new Runnable() {
     
    10781080        }
    10791081
    1080         while (stringMap.values().remove(null)) { }
    1081         while (listMap.values().remove(null)) { }
    1082         while (listlistMap.values().remove(null)) { }
    1083         while (listmapMap.values().remove(null)) { }
     1082        while (stringMap.values().remove(null));
     1083        while (listMap.values().remove(null));
     1084        while (listlistMap.values().remove(null));
     1085        while (listmapMap.values().remove(null));
    10841086
    10851087        stringMap.putAll(tmpPref.properties);
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r6248 r6310  
    738738    /* only for preferences */
    739739    synchronized public String getColorName(String o) {
    740         try
    741         {
     740        try {
    742741            Matcher m = Pattern.compile("mappaint\\.(.+?)\\.(.+)").matcher(o);
    743742            m.matches();
    744743            return tr("Paint style {0}: {1}", tr(m.group(1)), tr(m.group(2)));
    745         }
    746         catch (Exception e) {}
    747         try
    748         {
     744        } catch (Exception e) {
     745            Main.warn(e);
     746        }
     747        try {
    749748            Matcher m = Pattern.compile("layer (.+)").matcher(o);
    750749            m.matches();
    751750            return tr("Layer: {0}", tr(m.group(1)));
    752         }
    753         catch (Exception e) {}
     751        } catch (Exception e) {
     752            Main.warn(e);
     753        }
    754754        return tr(colornames.containsKey(o) ? colornames.get(o) : o);
    755755    }
  • trunk/src/org/openstreetmap/josm/data/ServerSidePreferences.java

    r6268 r6310  
    160160            download();
    161161        } catch (MissingPassword e) {
     162            Main.warn(e);
    162163        }
    163164    }
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r6289 r6310  
    440440        for (ImageryType type : ImageryType.values()) {
    441441            Matcher m = Pattern.compile(type.getUrlString()+"(?:\\[(?:(\\d+),)?(\\d+)\\])?:(.*)").matcher(url);
    442             if(m.matches()) {
     442            if (m.matches()) {
    443443                this.url = m.group(3);
    444444                this.imageryType = type;
    445                 if(m.group(2) != null) {
     445                if (m.group(2) != null) {
    446446                    defaultMaxZoom = Integer.valueOf(m.group(2));
    447447                }
    448                 if(m.group(1) != null) {
     448                if (m.group(1) != null) {
    449449                    defaultMinZoom = Integer.valueOf(m.group(1));
    450450                }
     
    453453        }
    454454
    455         if(serverProjections == null || serverProjections.isEmpty()) {
     455        if (serverProjections == null || serverProjections.isEmpty()) {
    456456            try {
    457457                serverProjections = new ArrayList<String>();
     
    461461                        serverProjections.add(p);
    462462                }
    463             } catch(Exception e) {
     463            } catch (Exception e) {
     464                Main.warn(e);
    464465            }
    465466        }
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java

    r6248 r6310  
    8989            }
    9090        }
    91         while (defaultLayers.remove(null)) {}
     91        while (defaultLayers.remove(null));
    9292
    9393        Collection<String> defaults = Main.pref.getCollection("imagery.layers.default");
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r6203 r6310  
    1111import java.util.regex.Pattern;
    1212
     13import org.openstreetmap.josm.Main;
    1314import org.openstreetmap.josm.data.Bounds;
    1415import org.openstreetmap.josm.data.coor.LatLon;
     
    451452            try {
    452453                return Integer.parseInt(code.substring(5));
    453             } catch (NumberFormatException e) {}
     454            } catch (NumberFormatException e) {
     455                Main.warn(e);
     456            }
    454457        }
    455458        return null;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r6222 r6310  
    2424import java.io.Serializable;
    2525
     26import org.openstreetmap.josm.Main;
    2627import org.openstreetmap.josm.tools.Utils;
    2728
     
    336337            }
    337338        } catch (CloneNotSupportedException cnse) {
     339            Main.warn(cnse);
    338340        }
    339341        return clone;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java

    r5073 r6310  
    1919 */
    2020package org.openstreetmap.josm.data.projection.datum;
     21
     22import org.openstreetmap.josm.Main;
    2123
    2224/**
     
    112114            Class.forName("java.nio.channels.FileChannel");
    113115            nioAvailable = true;
    114         } catch (ClassNotFoundException cnfe) {}
     116        } catch (ClassNotFoundException cnfe) {
     117            Main.info(cnfe.getMessage());
     118        }
    115119        return nioAvailable;
    116120    }
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r6221 r6310  
    438438                x = JOptionPane.getFrameForComponent(parent).getSize();
    439439            }
    440         } catch(NullPointerException e) { }
     440        } catch(NullPointerException e) {
     441            Main.warn(e);
     442        }
    441443        return x;
    442444    }
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r6296 r6310  
    218218                    synchronized (this) {
    219219                        // TODO Would be better if the timeout wasn't necessary
    220                         try {wait(1000);} catch (InterruptedException e) {}
     220                        try {
     221                            wait(1000);
     222                        } catch (InterruptedException e) {
     223                            Main.warn(e);
     224                        }
    221225                        ms.modifiers = mouseState.modifiers;
    222226                        ms.mousePos = mouseState.mousePos;
     
    337341                        });
    338342                    } catch (Exception e) {
    339 
     343                        Main.warn(e);
    340344                    }
    341345                }
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r6258 r6310  
    478478     */
    479479    public void smoothScrollTo(EastNorth newCenter) {
    480         // fixme make these configurable.
     480        // FIXME make these configurable.
    481481        final int fps = 20;     // animation frames per second
    482482        final int speed = 1500; // milliseconds for full-screen-width pan
     
    491491                @Override
    492492                public void run() {
    493                     for (int i=0; i<frames; i++)
    494                     {
    495                         // fixme - not use zoom history here
     493                    for (int i=0; i<frames; i++) {
     494                        // FIXME - not use zoom history here
    496495                        zoomTo(oldCenter.interpolate(finalNewCenter, (i+1) / frames));
    497                         try { Thread.sleep(1000 / fps); } catch (InterruptedException ex) { }
     496                        try {
     497                            Thread.sleep(1000 / fps);
     498                        } catch (InterruptedException ex) {
     499                            Main.warn(ex);
     500                        }
    498501                    }
    499502                }
  • trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java

    r6248 r6310  
    408408                Point min = new Point(valMinX.getTileIndex(), valMinY.getTileIndex());
    409409                Point max = new Point(valMaxX.getTileIndex(), valMaxY.getTileIndex());
    410                 if (min.x > max.x) {
    411 
    412                 }
    413410                int zoomlevel = (Integer)spZoomLevel.getValue();
    414411                TileBounds tb = new TileBounds(min, max, zoomlevel);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r6246 r6310  
    620620                    return;
    621621                }
    622             } catch (NumberFormatException ex) { }
     622            } catch (NumberFormatException ex) {
     623                Main.warn(ex);
     624            }
    623625            JOptionPane.showMessageDialog(this, tr("Please enter integer number between 0 and {0}", MAX_LRU_TAGS_NUMBER));
    624626           
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r6235 r6310  
    259259        @Override
    260260        public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
    261             if (qName.equals("searchresults")) {
    262             } else if (qName.equals("description") && description != null) {
     261            if (qName.equals("description") && description != null) {
    263262                currentResult.description = description.toString();
    264263                description = null;
    265264            }
    266265            depth--;
    267 
    268266        }
    269267
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r6248 r6310  
    243243            return colorModes.values()[i];
    244244        } catch (Exception e) {
     245            Main.warn(e);
    245246        }
    246247        return colorModes.none;
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r6248 r6310  
    115115            defPath = OsmFileCacheTileLoader.getDefaultCacheDir().getAbsolutePath();
    116116        } catch (SecurityException e) {
     117            Main.warn(e);
    117118        }
    118119        PROP_TILECACHE_DIR = new StringProperty(PREFERENCE_PREFIX + ".tilecache_path", defPath);
     
    139140                    return loader;
    140141                } catch (IOException e) {
     142                    Main.warn(e);
    141143                }
    142144            }
     
    146148
    147149    /**
    148     * Plugins that wish to set custom tile loader should call this method
    149     */
     150     * Plugins that wish to set custom tile loader should call this method
     151     */
    150152    public static void setCustomTileLoaderFactory(TileLoaderFactory loaderFactory) {
    151153        TMSLayer.loaderFactory = loaderFactory;
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r6296 r6310  
    348348                        orientation = ExifReader.readOrientation(yLayer.data.get(index).getFile());
    349349                    } catch (Exception e) {
     350                        Main.warn(e);
    350351                    }
    351352                    imgDisp.setImage(yLayer.data.get(index).getFile(), orientation);
     
    381382                        orientation = ExifReader.readOrientation(sel);
    382383                    } catch (Exception e) {
     384                        Main.warn(e);
    383385                    }
    384386                    imgDisp.setImage(sel, orientation);
     
    388390                        date = ExifReader.readTime(sel);
    389391                    } catch (Exception e) {
     392                        Main.warn(e);
    390393                    }
    391394                    if (date != null) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java

    r6296 r6310  
    8080                    Thread.sleep(5);
    8181                } catch (InterruptedException e) {
     82                    Main.warn(e);
    8283                }
    8384            }
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java

    r6281 r6310  
    8282        BufferedImage scaledBI = new BufferedImage(targetSize.width, targetSize.height, BufferedImage.TYPE_INT_RGB);
    8383        Graphics2D g = scaledBI.createGraphics();
    84         while (!g.drawImage(img, 0, 0, targetSize.width, targetSize.height, null))
    85         {
     84        while (!g.drawImage(img, 0, 0, targetSize.width, targetSize.height, null)) {
    8685            try {
    8786                Thread.sleep(10);
    88             } catch(InterruptedException ie) {}
     87            } catch(InterruptedException ie) {
     88                Main.warn(ie);
     89            }
    8990        }
    9091        g.dispose();
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r6299 r6310  
    233233                            double syncOffset = Double.parseDouble(exts.get("sync-offset"));
    234234                            audioMarker.syncOffset = syncOffset;
    235                         } catch (NumberFormatException nfe) {}
     235                        } catch (NumberFormatException nfe) {
     236                            Main.warn(nfe);
     237                        }
    236238                    }
    237239                    return audioMarker;
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r6248 r6310  
    115115                try {
    116116                    offset = Double.parseDouble(exts.get("offset"));
    117                 } catch (NumberFormatException nfe) {}
     117                } catch (NumberFormatException nfe) {
     118                    Main.warn(nfe);
     119                }
    118120            }
    119121            if (offset == null) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java

    r6285 r6310  
    126126                return f;
    127127            } catch (NumberFormatException e) {
     128                Main.warn(e);
    128129            }
    129130        }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java

    r5801 r6310  
    88import java.util.Arrays;
    99
     10import org.openstreetmap.josm.Main;
    1011import org.openstreetmap.josm.data.osm.Node;
    1112import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    137138            /* if we have a "width" tag, try use it */
    138139            String widthTag = env.osm.get("width");
    139             if(widthTag == null) {
     140            if (widthTag == null) {
    140141                widthTag = env.osm.get("est_width");
    141142            }
    142             if(widthTag != null) {
     143            if (widthTag != null) {
    143144                try {
    144145                    realWidth = Float.valueOf(widthTag);
    145                 }
    146                 catch(NumberFormatException nfe) {
     146                } catch(NumberFormatException nfe) {
     147                    Main.warn(nfe);
    147148                }
    148149            }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java

    r6289 r6310  
    7575                        Main.JOSM_WEBSITE+"/mappaint-style-1.0",
    7676                        "resource://data/mappaint-style.xsd");
    77                 while (parser.hasNext()) {
    78                 }
     77                while (parser.hasNext());
    7978            } finally {
    8079                closeSourceInputStream(in);
     
    328327                int numOver = 0, numUnder = 0;
    329328
    330                 while (mc.hasLayer(String.format("over_%d", ++numOver))) {}
    331                 while (mc.hasLayer(String.format("under_%d", ++numUnder))) {}
     329                while (mc.hasLayer(String.format("over_%d", ++numOver)));
     330                while (mc.hasLayer(String.format("under_%d", ++numUnder)));
    332331
    333332                for (LinemodPrototype mod : p.linemods) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r6223 r6310  
    419419                setSelectedComponent(sel);
    420420            }
    421         } catch (IllegalArgumentException e) {}
     421        } catch (IllegalArgumentException e) {
     422            Main.warn(e);
     423        }
    422424    }
    423425
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java

    r6295 r6310  
    66import java.util.Collection;
    77import java.util.Collections;
     8
     9import org.openstreetmap.josm.Main;
    810
    911public class GaussKruegerProjectionChoice extends ListProjectionChoice {
     
    3234        try {
    3335            return Integer.parseInt(zone) - 2;
    34         } catch(NumberFormatException e) {}
     36        } catch(NumberFormatException e) {
     37            Main.warn(e);
     38        }
    3539        return defaultIndex;
    3640    }
     
    4650
    4751    @Override
    48     public Collection<String> getPreferencesFromCode(String code)
    49     {
     52    public Collection<String> getPreferencesFromCode(String code) {
    5053        //zone 2 = EPSG:31466 up to zone 5 = EPSG:31469
    5154        for (int zone = 2; zone <= 5; zone++) {
  • trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java

    r6248 r6310  
    158158    }
    159159
    160     public File getFile()
    161     {
     160    public File getFile() {
    162161        return file;
    163162    }
    164163
    165     static public void cleanup(String name)
    166     {
     164    public static void cleanup(String name) {
    167165        cleanup(name, null);
    168166    }
    169     static public void cleanup(String name, String destDir)
    170     {
     167   
     168    public static void cleanup(String name, String destDir) {
    171169        URL url;
    172170        try {
    173171            url = new URL(name);
    174             if (!url.getProtocol().equals("file"))
    175             {
     172            if (!url.getProtocol().equals("file")) {
    176173                String prefKey = getPrefKey(url, destDir);
    177174                List<String> localPath = new ArrayList<String>(Main.pref.getCollection(prefKey));
     
    184181                Main.pref.putCollection(prefKey, null);
    185182            }
    186         } catch (java.net.MalformedURLException e) {}
     183        } catch (MalformedURLException e) {
     184            Main.warn(e);
     185        }
    187186    }
    188187
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r6268 r6310  
    537537
    538538    private void sleepAndListen(int retry, ProgressMonitor monitor) throws OsmTransferCanceledException {
    539         System.out.print(tr("Waiting 10 seconds ... "));
    540         for(int i=0; i < 10; i++) {
     539        Main.info(tr("Waiting 10 seconds ... "));
     540        for (int i=0; i < 10; i++) {
    541541            if (monitor != null) {
    542542                monitor.setCustomText(tr("Starting retry {0} of {1} in {2} seconds ...", getMaxRetries() - retry,getMaxRetries(), 10-i));
     
    546546            try {
    547547                Thread.sleep(1000);
    548             } catch (InterruptedException ex) {}
     548            } catch (InterruptedException ex) {
     549                Main.warn(ex);
     550            }
    549551        }
    550552        Main.info(tr("OK - trying again."));
  • trunk/src/org/openstreetmap/josm/io/imagery/Grabber.java

    r4745 r6310  
    6666                try { // sleep some time and then ask the server again
    6767                    Thread.sleep(random(1000, 2000));
    68                 } catch (InterruptedException e1) {}
    69 
     68                } catch (InterruptedException e1) {
     69                    Main.debug(e1.getMessage());
     70                }
    7071                if(i == maxTries) {
    7172                    e.printStackTrace();
  • trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java

    r4874 r6310  
    258258                } else if (qName.equals("icon")) {
    259259                    entry.setIcon(accumulator.toString());
    260                 } else {
    261260                }
    262261                break;
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

    r6271 r6310  
    378378                            try {
    379379                                d = Integer.parseInt(sd);
    380                             } catch (NumberFormatException ex) {}
     380                            } catch (NumberFormatException ex) {
     381                                Main.warn(ex);
     382                            }
    381383                            if (d != null) {
    382384                                deps.put(idx, d);
     
    492494                    double opacity = Double.parseDouble(el.getAttribute("opacity"));
    493495                    layer.setOpacity(opacity);
    494                 } catch (NumberFormatException ex) {}
     496                } catch (NumberFormatException ex) {
     497                    Main.warn(ex);
     498                }
    495499            }
    496500        }
  • trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java

    r6248 r6310  
    210210        stage = stageStr == null ? 50 : Integer.parseInt(stageStr);
    211211        version = attr.getValue("Plugin-Version");
    212         try { mainversion = Integer.parseInt(attr.getValue("Plugin-Mainversion")); }
    213         catch(NumberFormatException e) {}
     212        try {
     213            mainversion = Integer.parseInt(attr.getValue("Plugin-Mainversion"));
     214        } catch(NumberFormatException e) {
     215            Main.warn(e);
     216        }
    214217        author = attr.getValue("Author");
    215218        iconPath = attr.getValue("Plugin-Icon");
  • trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java

    r2830 r6310  
    44import java.util.List;
    55
     6import org.openstreetmap.josm.Main;
    67import org.openstreetmap.josm.gui.MapFrame;
    78import org.openstreetmap.josm.gui.download.DownloadSelection;
     
    2930            plugin.getClass().getMethod("mapFrameInitialized", MapFrame.class, MapFrame.class).invoke(plugin, oldFrame, newFrame);
    3031        } catch (NoSuchMethodException e) {
     32            Main.debug("Plugin "+plugin+" does not define mapFrameInitialized");
    3133        } catch (Exception e) {
    3234            BugReportExceptionHandler.handleException(new PluginException(this, getPluginInformation().name, e));
     
    3840            return (PreferenceSetting)plugin.getClass().getMethod("getPreferenceSetting").invoke(plugin);
    3941        } catch (NoSuchMethodException e) {
     42            Main.debug("Plugin "+plugin+" does not define getPreferenceSetting");
    4043            return null;
    4144        } catch (Exception e) {
     
    4952            plugin.getClass().getMethod("addDownloadSelection", List.class).invoke(plugin, list);
    5053        } catch (NoSuchMethodException e) {
    51             // ignore
     54            Main.debug("Plugin "+plugin+" does not define addDownloadSelection");
    5255        } catch (Exception e) {
    5356            BugReportExceptionHandler.handleException(new PluginException(this, getPluginInformation().name, e));
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r6246 r6310  
    198198     */
    199199    public static void reset() {
    200         if(audioPlayer != null)
    201         {
     200        if(audioPlayer != null) {
    202201            try {
    203202                pause();
    204             } catch(Exception e) {}
     203            } catch(Exception e) {
     204                Main.warn(e);
     205            }
    205206            audioPlayer.playingUrl = null;
    206207        }
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r6283 r6310  
    603603                        try {
    604604                            img = ImageIO.read(new ByteArrayInputStream(buf));
    605                         } catch (IOException e) {}
     605                        } catch (IOException e) {
     606                            Main.warn(e);
     607                        }
    606608                        return img == null ? null : new ImageResource(img);
    607609                    default:
     
    657659                    return f.toURI().toURL();
    658660            } catch (MalformedURLException e) {
     661                Main.warn(e);
    659662            }
    660663        }
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r6203 r6310  
    2323            }
    2424        } catch (UnsupportedEncodingException x) {
     25            Main.error(x);
    2526        } catch (IllegalArgumentException x) {
     27            Main.error(x);
    2628        }
    2729        Bounds b = parseShortLink(url);
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r6103 r6310  
    1414import java.util.List;
    1515
     16import org.openstreetmap.josm.Main;
     17
    1618/**
    1719 * see PlatformHook.java
     
    4244                return;
    4345            } catch (IOException e) {
     46                Main.warn(e);
    4447            }
    4548        }
     
    123126            }
    124127        } catch (IOException e) {
     128            Main.warn(e);
    125129        }
    126130        return null;
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r6268 r6310  
    394394                    Thread.sleep(1);
    395395                } catch (InterruptedException ex) {
     396                    Main.warn(ex);
    396397                }
    397398            }
Note: See TracChangeset for help on using the changeset viewer.