You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Jiri Prox (JIRA)" <ji...@apache.org> on 2017/07/24 11:43:00 UTC
[jira] [Created] (NETBEANS-43) Test project action does not work
when accessing class from not exported package
Jiri Prox created NETBEANS-43:
---------------------------------
Summary: Test project action does not work when accessing class from not exported package
Key: NETBEANS-43
URL: https://issues.apache.org/jira/browse/NETBEANS-43
Project: NetBeans
Issue Type: Bug
Components: java - Project
Affects Versions: 9.0
Reporter: Jiri Prox
The test action fails on multi-module project when accessing classes from non-exported package. This is *Windows* specific!
Steps to reproduce:
# Create multi module
# Create new module
# Create new class in some package (e.g. org.Foo)
# Generate jUnit test
# In test class in some method use "new Foo()"
# Call 'Test' action on whole project
->
WARNING: Unknown module: C: specified to --add-exports
WARNING: Unknown module: C: specified to --add-exports
Testsuite: org.impl.ImplTest
Tests run: 0, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0,159 sec
Testcase: org.impl.ImplTest: Caused an ERROR
class org.junit.runners.model.FrameworkMethod$1 cannot access class org.impl.ImplTest (in module impl) because module impl does not export org.impl to unnamed module @7ea37dbf
java.lang.IllegalAccessException: class org.junit.runners.model.FrameworkMethod$1 cannot access class org.impl.ImplTest (in module impl) because module impl does not export org.impl to unnamed module @7ea37dbf
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:589)
Testcase: org.impl.ImplTest: Caused an ERROR
class org.junit.runners.model.FrameworkMethod$1 cannot access class org.impl.ImplTest (in module impl) because module impl does not export org.impl to unnamed module @7ea37dbf
java.lang.IllegalAccessException: class org.junit.runners.model.FrameworkMethod$1 cannot access class org.impl.ImplTest (in module impl) because module impl does not export org.impl to unnamed module @7ea37dbf
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:589)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)