Document why OK to suppress unchecked warning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@903047 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7e8bf7eedd
commit
112c7aa7c9
|
@ -622,7 +622,7 @@ public class OpenIntToFieldHashMap<T extends FieldElement<T>> implements Seriali
|
||||||
* @param length size of the array to build
|
* @param length size of the array to build
|
||||||
* @return a new array
|
* @return a new array
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked") // field is of type T
|
||||||
private T[] buildArray(final int length) {
|
private T[] buildArray(final int length) {
|
||||||
return (T[]) Array.newInstance(field.getZero().getClass(), length);
|
return (T[]) Array.newInstance(field.getZero().getClass(), length);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue