Ignore:
Timestamp:
2017-06-18T01:36:38+02:00 (2 years ago)
Author:
Don-vip
Message:

fix more SonarQube issues

Location:
trunk/src/org/openstreetmap/josm/io/audio
Files:
2 edited

Legend:

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

    r12413 r12414  
    3535    private final ListenerList<AudioListener> listeners = ListenerList.create();
    3636
    37     private URL url;
    3837    private MediaPlayer mediaPlayer;
    3938
     
    5049
    5150        // Note, this method is called on the FX Application Thread
    52         PlatformImpl.startup(() -> startupLatch.countDown());
     51        PlatformImpl.startup(startupLatch::countDown);
    5352
    5453        // Wait for FX platform to start
     
    5958    public void play(Execute command, State stateChange, URL playingUrl) throws AudioException, IOException {
    6059        try {
    61             url = command.url();
     60            final URL url = command.url();
    6261            if (playingUrl != url) {
    6362                if (mediaPlayer != null) {
     
    6968                }
    7069                mediaPlayer = new MediaPlayer(new Media(url.toString()));
    71                 mediaPlayer.setOnPlaying(() -> {
    72                     listeners.fireEvent(l -> l.playing(url));
    73                 });
     70                mediaPlayer.setOnPlaying(() ->
     71                    listeners.fireEvent(l -> l.playing(url))
     72                );
    7473            }
    7574            mediaPlayer.setRate(command.speed());
  • trunk/src/org/openstreetmap/josm/io/audio/JavaSoundPlayer.java

    r12413 r12414  
    3737
    3838    private double bytesPerSecond;
    39     private byte[] abData = new byte[chunk];
     39    private final byte[] abData = new byte[chunk];
    4040
    4141    private double position; // seconds
Note: See TracChangeset for help on using the changeset viewer.