Parcourir la source

Fix pointless array creation.

Change-Id: I5e57e40476bdfade587f3bb86d865e7eb2b3e29b
Reviewed-on: http://gerrit.dmdirc.com/3880
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
changes/80/3880/2
Chris Smith il y a 9 ans
Parent
révision
ca4d10b564
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3
    3
      src/com/dmdirc/parser/irc/Logging.java

+ 3
- 3
src/com/dmdirc/parser/irc/Logging.java Voir le fichier

@@ -125,7 +125,7 @@ public class Logging {
125 125
         if (isAvailable) {
126 126
             try {
127 127
                 final Method check = log.getClass().getMethod(level.getCheckMethodName());
128
-                return (Boolean) check.invoke(log, new Object[0]);
128
+                return (Boolean) check.invoke(log);
129 129
             } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException nsme) {
130 130
             }
131 131
         }
@@ -157,10 +157,10 @@ public class Logging {
157 157
         try {
158 158
             if (throwable == null) {
159 159
                 final Method method = log.getClass().getMethod(level.getMethodName(), String.class);
160
-                method.invoke(log, new Object[]{message});
160
+                method.invoke(log, message);
161 161
             } else {
162 162
                 final Method method = log.getClass().getMethod(level.getMethodName(), String.class, Throwable.class);
163
-                method.invoke(log, new Object[]{message, throwable});
163
+                method.invoke(log, message, throwable);
164 164
             }
165 165
         } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException nsme) {
166 166
         }

Chargement…
Annuler
Enregistrer