Browse Source

Fix compiler warnings I added.

pull/124/head
Greg Holmes 9 years ago
parent
commit
b06cc1322a
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      ui_swing/src/com/dmdirc/addons/ui_swing/Apple.java

+ 8
- 8
ui_swing/src/com/dmdirc/addons/ui_swing/Apple.java View File

130
      * @return Output from method.invoke()
130
      * @return Output from method.invoke()
131
      */
131
      */
132
     private Object reflectMethod(final Object obj, final String className, final String methodName,
132
     private Object reflectMethod(final Object obj, final String className, final String methodName,
133
-            final Class<?>[] classes, final Object... objects) {
133
+            final Class<?>[] classes, final Object[] objects) {
134
         try {
134
         try {
135
             final Class<?> clazz = className == null ? obj.getClass() : Class.forName(className);
135
             final Class<?> clazz = className == null ? obj.getClass() : Class.forName(className);
136
             final Method method = clazz.getMethod(methodName, classes == null ? new Class<?>[0]
136
             final Method method = clazz.getMethod(methodName, classes == null ? new Class<?>[0]
153
      * @return Output from method.invoke()
153
      * @return Output from method.invoke()
154
      */
154
      */
155
     private Object doAppleMethod(final String methodName, final Class<?>[] classes,
155
     private Object doAppleMethod(final String methodName, final Class<?>[] classes,
156
-            final Object... objects) {
156
+            final Object[] objects) {
157
         if (!isApple()) {
157
         if (!isApple()) {
158
             return null;
158
             return null;
159
         }
159
         }
223
      *                   only the foremost one
223
      *                   only the foremost one
224
      */
224
      */
225
     public void requestForeground(final boolean allWindows) {
225
     public void requestForeground(final boolean allWindows) {
226
-        doAppleMethod("requestForeground", new Class<?>[]{Boolean.TYPE}, allWindows);
226
+        doAppleMethod("requestForeground", new Class<?>[]{Boolean.TYPE}, new Object[]{allWindows});
227
     }
227
     }
228
 
228
 
229
     /**
229
     /**
235
      *                   until clicked on.
235
      *                   until clicked on.
236
      */
236
      */
237
     public void requestUserAttention(final boolean isCritical) {
237
     public void requestUserAttention(final boolean isCritical) {
238
-        doAppleMethod("requestUserAttention", new Class<?>[]{Boolean.TYPE}, isCritical);
238
+        doAppleMethod("requestUserAttention", new Class<?>[]{Boolean.TYPE}, new Object[]{isCritical});
239
     }
239
     }
240
 
240
 
241
     /**
241
     /**
244
      * @param menu the PopupMenu to attach to this application's Dock icon
244
      * @param menu the PopupMenu to attach to this application's Dock icon
245
      */
245
      */
246
     public void setDockMenu(final PopupMenu menu) {
246
     public void setDockMenu(final PopupMenu menu) {
247
-        doAppleMethod("setDockMenu", new Class<?>[]{PopupMenu.class}, menu);
247
+        doAppleMethod("setDockMenu", new Class<?>[]{PopupMenu.class}, new Object[]{menu});
248
     }
248
     }
249
 
249
 
250
     /**
250
     /**
263
      * @param image The image to use
263
      * @param image The image to use
264
      */
264
      */
265
     public void setDockIconImage(final Image image) {
265
     public void setDockIconImage(final Image image) {
266
-        doAppleMethod("setDockIconImage", new Class<?>[]{Image.class}, image);
266
+        doAppleMethod("setDockIconImage", new Class<?>[]{Image.class}, new Object[]{image});
267
     }
267
     }
268
 
268
 
269
     /**
269
     /**
282
      * @param badge textual label to affix to the Dock icon
282
      * @param badge textual label to affix to the Dock icon
283
      */
283
      */
284
     public void setDockIconBadge(final String badge) {
284
     public void setDockIconBadge(final String badge) {
285
-        doAppleMethod("setDockIconBadge", new Class<?>[]{String.class}, badge);
285
+        doAppleMethod("setDockIconBadge", new Class<?>[]{String.class}, new Object[]{badge});
286
     }
286
     }
287
 
287
 
288
     /**
288
     /**
292
      * @param menuBar to use when no other frames are active
292
      * @param menuBar to use when no other frames are active
293
      */
293
      */
294
     public void setDefaultMenuBar(final JMenuBar menuBar) {
294
     public void setDefaultMenuBar(final JMenuBar menuBar) {
295
-        doAppleMethod("setDefaultMenuBar", new Class<?>[]{JMenuBar.class}, menuBar);
295
+        doAppleMethod("setDefaultMenuBar", new Class<?>[]{JMenuBar.class}, new Object[]{menuBar});
296
     }
296
     }
297
 
297
 
298
     /**
298
     /**

Loading…
Cancel
Save