Browse Source

Suppress rawtypes when doing unchecked operations

Change-Id: If70f324c0a7941857036935affc34829c12ec5e3
Reviewed-on: http://gerrit.dmdirc.com/2668
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
changes/68/2668/2
Chris Smith 10 years ago
parent
commit
527214529e

+ 1
- 1
src/com/dmdirc/util/collections/ListenerList.java View File

138
      * @param listenerType The type of listener to be called
138
      * @param listenerType The type of listener to be called
139
      * @return A proxy instance that can be used to call methods
139
      * @return A proxy instance that can be used to call methods
140
      */
140
      */
141
-    @SuppressWarnings("unchecked")
141
+    @SuppressWarnings({"unchecked", "rawtypes"})
142
     public <T> T getCallable(final Class<T> listenerType) {
142
     public <T> T getCallable(final Class<T> listenerType) {
143
         return (T) Proxy.newProxyInstance(listenerType.getClassLoader(),
143
         return (T) Proxy.newProxyInstance(listenerType.getClassLoader(),
144
                 new Class[] { listenerType }, new CallHandler<T>(listenerType));
144
                 new Class[] { listenerType }, new CallHandler<T>(listenerType));

+ 5
- 3
src/com/dmdirc/util/collections/WeakList.java View File

78
      * @return A copy of the specified collection, with each item wrapped in
78
      * @return A copy of the specified collection, with each item wrapped in
79
      * a weak reference.
79
      * a weak reference.
80
      */
80
      */
81
-    @SuppressWarnings(value = "unchecked")
81
+    @SuppressWarnings({"unchecked", "rawtypes"})
82
     private Collection<WeakReference<T>> referenceCollection(
82
     private Collection<WeakReference<T>> referenceCollection(
83
             final Collection<?> c) {
83
             final Collection<?> c) {
84
         final Collection<WeakReference<T>> res
84
         final Collection<WeakReference<T>> res
108
     }
108
     }
109
 
109
 
110
     /** {@inheritDoc} */
110
     /** {@inheritDoc} */
111
-    @Override @SuppressWarnings("unchecked")
111
+    @Override
112
+    @SuppressWarnings({"unchecked", "rawtypes"})
112
     public boolean contains(final Object o) {
113
     public boolean contains(final Object o) {
113
         return list.contains(new EquatableWeakReference(o));
114
         return list.contains(new EquatableWeakReference(o));
114
     }
115
     }
138
     }
139
     }
139
 
140
 
140
     /** {@inheritDoc} */
141
     /** {@inheritDoc} */
141
-    @Override @SuppressWarnings(value = "unchecked")
142
+    @Override
143
+    @SuppressWarnings({"unchecked", "rawtypes"})
142
     public boolean remove(final Object o) {
144
     public boolean remove(final Object o) {
143
         return list.remove(new EquatableWeakReference(o));
145
         return list.remove(new EquatableWeakReference(o));
144
     }
146
     }

Loading…
Cancel
Save