Ignore:
Timestamp:
2014-04-29T03:24:57+02:00 (9 years ago)
Author:
Don-vip
Message:

Sonar - fix various issues

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r6830 r7025  
    1111import javax.sound.sampled.AudioSystem;
    1212import javax.sound.sampled.DataLine;
     13import javax.sound.sampled.LineUnavailableException;
    1314import javax.sound.sampled.SourceDataLine;
     15import javax.sound.sampled.UnsupportedAudioFileException;
    1416import javax.swing.JOptionPane;
    1517
     
    339341                    }
    340342                    command.ok(stateChange);
    341                 } catch (Exception startPlayingException) {
     343                } catch (LineUnavailableException | IOException | UnsupportedAudioFileException startPlayingException) {
    342344                    command.failed(startPlayingException); // sets state
    343345                }
  • trunk/src/org/openstreetmap/josm/tools/AudioUtil.java

    r6889 r7025  
    33
    44import java.io.File;
     5import java.io.IOException;
     6import java.net.MalformedURLException;
    57import java.net.URL;
    68
     
    810import javax.sound.sampled.AudioInputStream;
    911import javax.sound.sampled.AudioSystem;
     12import javax.sound.sampled.UnsupportedAudioFileException;
    1013
    1114import org.openstreetmap.josm.Main;
     
    4043            double calibration = Main.pref.getDouble("audio.calibration", 1.0 /* default, ratio */);
    4144            return naturalLength / calibration;
    42         } catch (Exception e) {
     45        } catch (UnsupportedAudioFileException | IOException e) {
    4346            return 0.0;
    4447        }
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r7024 r7025  
    770770                @Override
    771771                public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
    772                     if (localName.equalsIgnoreCase("img")) {
     772                    if ("img".equalsIgnoreCase(localName)) {
    773773                        String val = atts.getValue("src");
    774774                        if (val.endsWith(fn))
Note: See TracChangeset for help on using the changeset viewer.