Selaa lähdekoodia

Fix various compiler warnings

Change-Id: I8e738009b44b802535b8c06db62d2cb219cf9dcf
Reviewed-on: http://gerrit.dmdirc.com/1857
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
tags/0.7rc1
Greg Holmes 13 vuotta sitten
vanhempi
commit
23da9da013

+ 4
- 5
src/com/dmdirc/addons/ui_swing/components/addonbrowser/DataLoaderWorker.java Näytä tiedosto

@@ -31,7 +31,6 @@ import com.dmdirc.util.InvalidConfigFileException;
31 31
 
32 32
 import java.io.File;
33 33
 import java.io.IOException;
34
-import java.util.Arrays;
35 34
 import java.util.Collection;
36 35
 import java.util.Collections;
37 36
 import java.util.Map;
@@ -75,9 +74,9 @@ public class DataLoaderWorker
75 74
         try {
76 75
             data.read();
77 76
         } catch (IOException ex) {
78
-            return Arrays.asList(Collections.<String, String>emptyMap());
77
+            return Collections.<Map<String, String>>emptyList();
79 78
         } catch (InvalidConfigFileException ex) {
80
-            return Arrays.asList(Collections.<String, String>emptyMap());
79
+            return Collections.<Map<String, String>>emptyList();
81 80
         }
82 81
         return data.getKeyDomains().values();
83 82
     }
@@ -92,10 +91,10 @@ public class DataLoaderWorker
92 91
         try {
93 92
             data = get();
94 93
         } catch (InterruptedException ex) {
95
-            data = Arrays.asList(Collections.<String, String>emptyMap());
94
+            data = Collections.<Map<String, String>>emptyList();
96 95
         } catch (ExecutionException ex) {
97 96
             Logger.appError(ErrorLevel.MEDIUM, ex.getMessage(), ex);
98
-            data = Arrays.asList(Collections.<String, String>emptyMap());
97
+            data = Collections.<Map<String, String>>emptyList();
99 98
         }
100 99
         final int selectedRow;
101 100
         if (table.getRowCount() > 0 && table.getSelectedRow() > 0) {

+ 3
- 1
src/com/dmdirc/addons/ui_swing/components/expandingsettings/CurrentOptionsPanel.java Näytä tiedosto

@@ -100,6 +100,7 @@ public final class CurrentOptionsPanel extends JPanel implements
100 100
 
101 101
     /**
102 102
      * Adds an option to the current options pane.
103
+     * 
103 104
      * @param configName config option name
104 105
      * @param displayName config option display name
105 106
      * @param panel parent panel
@@ -107,7 +108,7 @@ public final class CurrentOptionsPanel extends JPanel implements
107 108
      */
108 109
     private void addCurrentOption(final JComponent component) {
109 110
         final JLabel label = new JLabel();
110
-        final ImageButton<JComponent> button = new ImageButton(
111
+        final ImageButton<JComponent> button = new ImageButton<JComponent>(
111 112
                 component.getName(),
112 113
                 IconManager.getIconManager().getIcon("close-inactive"),
113 114
                 IconManager.getIconManager().getIcon("close-active"));
@@ -145,6 +146,7 @@ public final class CurrentOptionsPanel extends JPanel implements
145 146
      * @param e Action performed
146 147
      */
147 148
     @Override
149
+    @SuppressWarnings("unchecked")
148 150
     public void actionPerformed(final ActionEvent e) {
149 151
         final JComponent setting = ((ImageButton<JComponent>)
150 152
                 e.getSource()).getObject();

Loading…
Peruuta
Tallenna