Pārlūkot izejas kodu

Fix pointless array creation.

Change-Id: I7e4e6e86c02dce066eb4a739259bbeef9df8620e
Reviewed-on: http://gerrit.dmdirc.com/3879
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
changes/79/3879/2
Chris Smith 9 gadus atpakaļ
vecāks
revīzija
0d9d18499a

+ 2
- 3
nowplaying/src/com/dmdirc/addons/nowplaying/ConfigPanel.java Parādīt failu

@@ -145,9 +145,8 @@ public class ConfigPanel extends JPanel implements PreferencesInterface, KeyList
145 145
 
146 146
         previewPanel = panel;
147 147
 
148
-        add(new NowPlayingSubsitutionPanel(Arrays.asList(new String[]{"app",
149
-            "title", "artist", "album", "bitrate", "format", "length",
150
-            "time", "state"})), "growx");
148
+        add(new NowPlayingSubsitutionPanel(Arrays.asList("app", "title", "artist", "album",
149
+                "bitrate", "format", "length", "time", "state")), "growx");
151 150
         schedulePreviewUpdate();
152 151
     }
153 152
 

+ 2
- 4
nowplaying/src/com/dmdirc/addons/nowplaying/NowPlayingCommand.java Parādīt failu

@@ -175,10 +175,8 @@ public class NowPlayingCommand extends Command implements IntelligentCommand {
175 175
     public AdditionalTabTargets getSuggestions(final int arg,
176 176
             final IntelligentCommandContext context) {
177 177
 
178
-        final List<String> subsList = Arrays.asList(new String[]{
179
-            "$artist", "$title", "$album", "$app", "$bitrate", "$format",
180
-            "$length", "$state", "$time"
181
-        });
178
+        final List<String> subsList = Arrays.asList("$artist", "$title", "$album", "$app",
179
+                "$bitrate", "$format", "$length", "$state", "$time");
182 180
 
183 181
         if (arg == 0) {
184 182
             final AdditionalTabTargets res = TabCompleterUtils.

+ 1
- 1
parser_xmpp/src/com/dmdirc/addons/parser_xmpp/XmppParser.java Parādīt failu

@@ -124,7 +124,7 @@ public class XmppParser extends BaseSocketAwareParser {
124 124
 
125 125
         LOG.debug(
126 126
                 "XMPP parser created with query string {}, parsed fake channel = {}, priority = {}",
127
-                new Object[]{address.getQuery(), useFakeChannel, priority});
127
+                address.getQuery(), useFakeChannel, priority);
128 128
     }
129 129
 
130 130
     @Override

+ 1
- 3
serverlists/src/com/dmdirc/addons/serverlists/service/ServerListServiceProvider.java Parādīt failu

@@ -67,9 +67,7 @@ public class ServerListServiceProvider implements ServiceProvider {
67 67
         this.serverList = serverList;
68 68
         this.pluginManager = pluginManager;
69 69
         this.eventBus = eventBus;
70
-        this.services = Arrays.asList(new Service[]{
71
-            pluginManager.getService("parser", "serverlist", true)
72
-        });
70
+        this.services = Arrays.asList(pluginManager.getService("parser", "serverlist", true));
73 71
     }
74 72
 
75 73
     /**

+ 1
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/Apple.java Parādīt failu

@@ -309,7 +309,7 @@ public class Apple implements InvocationHandler {
309 309
                     new Class<?>[]{listenerClass}, this);
310 310
 
311 311
             final Method method = getApplication().getClass().getMethod(handlerMethod,
312
-                    new Class<?>[]{listenerClass});
312
+                    listenerClass);
313 313
             method.invoke(getApplication(), listener);
314 314
 
315 315
             return true;

+ 2
- 6
ui_swing/src/com/dmdirc/addons/ui_swing/components/URLProtocolPanel.java Parādīt failu

@@ -129,12 +129,8 @@ public class URLProtocolPanel extends JPanel implements ActionListener,
129 129
         optionType.add(mail);
130 130
         optionType.add(custom);
131 131
 
132
-        subsPanel = new URLSubstitutionsPanel(Arrays.asList(new String[]{
133
-            "url",
134
-            "fragment", "host", "path", "port", "query", "protocol",
135
-            "username",
136
-            "password"
137
-        }));
132
+        subsPanel = new URLSubstitutionsPanel(Arrays.asList("url", "fragment", "host", "path",
133
+                "port", "query", "protocol", "username", "password"));
138 134
         subsPanel.setVisible(custom.isSelected());
139 135
 
140 136
         updateSelection();

Notiek ielāde…
Atcelt
Saglabāt