Ignore:
Timestamp:
2016-12-09T23:31:13+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S00112 - Generic exceptions should never be thrown: define JosmRuntimeException

Location:
trunk/src/org/openstreetmap/josm/actions/search
Files:
2 edited

Legend:

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

    r8846 r11374  
    1212
    1313import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError;
     14import org.openstreetmap.josm.tools.JosmRuntimeException;
    1415
    1516public class PushbackTokenizer {
     
    7475            c = search.read();
    7576        } catch (IOException e) {
    76             throw new RuntimeException(e.getMessage(), e);
     77            throw new JosmRuntimeException(e.getMessage(), e);
    7778        }
    7879    }
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r10711 r11374  
    5555import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
    5656import org.openstreetmap.josm.tools.GBC;
     57import org.openstreetmap.josm.tools.JosmRuntimeException;
    5758import org.openstreetmap.josm.tools.Shortcut;
    5859import org.openstreetmap.josm.tools.Utils;
     
    229230                            tf.getDocument().insertString(tf.getCaretPosition(), ' ' + insertText, null);
    230231                        } catch (BadLocationException ex) {
    231                             throw new RuntimeException(ex.getMessage(), ex);
     232                            throw new JosmRuntimeException(ex.getMessage(), ex);
    232233                        }
    233234                    }
Note: See TracChangeset for help on using the changeset viewer.