From: Jim Procter Date: Wed, 25 Oct 2017 13:58:11 +0000 (+0100) Subject: JAL-2392 auto boxing rather than explicit Long as key X-Git-Tag: Release_2_10_3b1~78^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=734fbf22ec94ca02785b9ea1869f798241208525;p=jalview.git JAL-2392 auto boxing rather than explicit Long as key --- diff --git a/src/jalview/gui/ProgressBar.java b/src/jalview/gui/ProgressBar.java index d7b04ee..011d810 100644 --- a/src/jalview/gui/ProgressBar.java +++ b/src/jalview/gui/ProgressBar.java @@ -126,9 +126,7 @@ public class ProgressBar implements IProgressIndicator @Override public void run() { - final Long longId = Long.valueOf(id); - - JPanel progressPanel = progressBars.get(longId); + JPanel progressPanel = progressBars.get(id); if (progressPanel != null) { /* @@ -139,9 +137,9 @@ public class ProgressBar implements IProgressIndicator { statusBar.setText(message); } - if (progressBarHandlers.containsKey(longId)) + if (progressBarHandlers.containsKey(id)) { - progressBarHandlers.remove(longId); + progressBarHandlers.remove(id); } removeRow(progressPanel); } @@ -160,7 +158,7 @@ public class ProgressBar implements IProgressIndicator addRow(progressPanel); - progressBars.put(longId, progressPanel); + progressBars.put(id, progressPanel); } refreshLayout(); @@ -230,8 +228,7 @@ public class ProgressBar implements IProgressIndicator @Override public void run() { - Long longId = Long.valueOf(id); - final JPanel progressPanel = progressBars.get(longId); + final JPanel progressPanel = progressBars.get(id); if (progressPanel == null) { System.err.println( @@ -247,7 +244,7 @@ public class ProgressBar implements IProgressIndicator return; } - progressBarHandlers.put(longId, handler); + progressBarHandlers.put(id, handler); JButton cancel = new JButton( MessageManager.getString("action.cancel")); cancel.addActionListener(new ActionListener()