odules:ty:compileJavaWARNING

modules:ty:compileJava WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/Users/---/.gradle/caches/3.0/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages() WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

-Xlint:deprecation | deprecated API | use unchecked or unsafe operations

Note: Some input files use or override a deprecated API.

(It simply means that you are calling methods which have been marked with a @Deprecated annotation.)

Note: Recompile with -Xlint:deprecation for details.

(Probably, that is because you need to declare a List object, say (e.g.), without omitting '<' and '>':
List<Integer> list = new ArrayList<Integer>();)
Note: Some input files use unchecked or unsafe operations.

(for example when you call a function that returns Generic Collections and you don't specify the generic parameters yourself.
for a function
List<String> getNames()


List names = obj.getNames();
will generate this error.
To solve it you would just add the parameters
List<String> names = obj.getNames();)


Note: Recompile with -Xlint:unchecked for details.

(From what I can tell in the docs, you can't do it on the command-line.
According to the javac documentation, -Xlint:none only disables warnings "not mandated by the Java Language Specification". It appears that warning you of the use of deprecated APIs is managed by the language spec.
Your best option would be to fix the use of deprecated APIs. However, an option would be to add the @SuppressWarnings("deprecation") annotation to the classes or methods that are using the deprecated APIs.)

Commentaires

Posts les plus consultés de ce blog

Failed to execute goal org.codehaus.mojo:exec-maven-plugin

java.io.IOException: Cannot run program "C:\wamp\bin\mysql\mysql5.6.17\bin": CreateProcess error=5, Access is denied

Java 9 ERR_01