mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
unchecked warnings as fair inspection
This commit is contained in:
+3
-3
@@ -86,12 +86,12 @@ class SemKey<T extends String> {
|
||||
}
|
||||
|
||||
public static <T> T[] append(final T[] src, final T element) {
|
||||
return append(src, element, (Class<T>)src.getClass().getComponentType());
|
||||
return append(src, element, <warning descr="Unchecked cast: 'java.lang.Class<capture<?>>' to 'java.lang.Class<T>'">(Class<T>)src.getClass().getComponentType()</warning>);
|
||||
}
|
||||
|
||||
public static <T> T[] append(T[] src, final T element, Class<T> componentType) {
|
||||
int length = src.length;
|
||||
T[] result = (T[])java.lang.reflect.Array.newInstance(componentType, length + 1);
|
||||
T[] result = <warning descr="Unchecked cast: 'java.lang.Object' to 'T[]'">(T[])java.lang.reflect.Array.newInstance(componentType, length + 1)</warning>;
|
||||
System.arraycopy(src, 0, result, 0, length);
|
||||
result[length] = element;
|
||||
return result;
|
||||
@@ -118,4 +118,4 @@ class OCM<T> {
|
||||
OCM(T s, Condition<T>... c) {
|
||||
this(s, false, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user