[
https://issues.apache.org/jira/browse/NETBEANS-43?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jiri Prox updated NETBEANS-43:
------------------------------
Attachment: output.txt
output (ant logging set tot debug)
> 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
> Attachments: output.txt
>
>
> 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)