Closed scifinder closed 6 years ago
Yes it is because how Java deals with generics.
Ideas for fixing/suppressing this error: https://medium.com/@BladeCoder/fixing-ugly-java-apis-read-only-generic-varargs-ee2d2e464ac1
Ok, I append @SuppressWarnings("unchecked") before my function.
Use @SafeVarargs
before the initialization of the function.
Hello! =) I'm updated Fotoapparat in my application from 1.3.0 to 2.2.0. I rewrote this code fragment
like this
But I get a warning "Unchecked generic array creation for varargs parameter" for "firstAvailable". This is normal?