瀏覽代碼

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 年之前
父節點
當前提交
527214529e
共有 2 個檔案被更改,包括 6 行新增4 行删除
  1. 1
    1
      src/com/dmdirc/util/collections/ListenerList.java
  2. 5
    3
      src/com/dmdirc/util/collections/WeakList.java

+ 1
- 1
src/com/dmdirc/util/collections/ListenerList.java 查看文件

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

+ 5
- 3
src/com/dmdirc/util/collections/WeakList.java 查看文件

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

Loading…
取消
儲存