Ignore:
Timestamp:
2018-08-24T00:31:57+02:00 (7 years ago)
Author:
donvip
Message:

fix java warnings - CatchAndPrintStackTrace

Location:
applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkRuleChecker.java

    r34559 r34599  
    3636import org.openstreetmap.josm.plugins.tag2link.io.SourcesReader;
    3737import org.openstreetmap.josm.spi.preferences.Config;
     38import org.openstreetmap.josm.tools.Logging;
    3839
    3940/**
     
    120121                    result = result.replaceFirst(Pattern.quote(m.group()), val);
    121122                } catch (UnsupportedEncodingException e) {
    122                     e.printStackTrace();
     123                    Logging.error(e);
    123124                }
    124125            } else {
  • applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/action/OpenMailAction.java

    r33150 r34599  
    2525import org.openstreetmap.josm.plugins.tag2link.Tag2LinkConstants;
    2626import org.openstreetmap.josm.plugins.tag2link.data.Link;
     27import org.openstreetmap.josm.tools.Logging;
    2728
    2829/**
     
    5253                Desktop.getDesktop().mail(new URI(url));
    5354            } catch (Exception ex) {
    54                 ex.printStackTrace();
     55                Logging.error(ex);
    5556            }
    5657        }
  • applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/io/SourcesReader.java

    r33150 r34599  
    4141import org.openstreetmap.josm.plugins.tag2link.data.Rule;
    4242import org.openstreetmap.josm.plugins.tag2link.data.Source;
     43import org.openstreetmap.josm.tools.Logging;
    4344
    4445/**
     
    7172            XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(ir);
    7273            result.addAll(new SourcesReader(parser).parseDoc());
    73         } catch (IOException e) {
    74             e.printStackTrace();
    75         } catch (XMLStreamException e) {
    76             e.printStackTrace();
    77         } catch (FactoryConfigurationError e) {
    78             e.printStackTrace();
     74        } catch (IOException | XMLStreamException | FactoryConfigurationError e) {
     75            Logging.error(e);
    7976        }
    8077       
Note: See TracChangeset for help on using the changeset viewer.