mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Inspection to check that qualified names in Class.forName() belongs to exported or open package (IDEA-167271)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package my.main;
|
||||
|
||||
class Main {
|
||||
void foo() throws Exception {
|
||||
Class.forName("my.api.Api");
|
||||
Class.forName(<warning descr="The module 'API' does not export the package 'my.impl' to the module 'MAIN'">"my.impl.Impl"</warning>);
|
||||
Class.forName(<warning descr="The module 'API' does not open the package 'my.api' to the module 'MAIN'">"my.api.PackageLocal"</warning>);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package my.main;
|
||||
|
||||
class Main {
|
||||
void foo() throws Exception {
|
||||
Class.forName(<warning descr="The module 'MAIN' does not have the module 'API' in requirements">"my.api.Api"</warning>);
|
||||
Class.forName(<warning descr="The module 'MAIN' does not have the module 'API' in requirements">"my.impl.Impl"</warning>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package my.main;
|
||||
|
||||
class Main {
|
||||
void foo() throws Exception {
|
||||
Class.forName("my.api.Api");
|
||||
Class.forName("my.impl.Impl");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package my.main;
|
||||
|
||||
class Main {
|
||||
void foo() throws Exception {
|
||||
Class.forName("my.api.Api");
|
||||
Class.forName(<warning descr="The module 'API' does not export the package 'my.impl' to the module 'MAIN'">"my.impl.Impl"</warning>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user