netbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svatopluk Dedic (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (NETBEANS-43) Test project action does not work when accessing class from not exported package
Date Fri, 28 Jul 2017 14:03:00 GMT

     [ https://issues.apache.org/jira/browse/NETBEANS-43?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Svatopluk Dedic resolved NETBEANS-43.
-------------------------------------
       Resolution: Fixed
         Assignee: Svatopluk Dedic
    Fix Version/s: 9.0

Fixed by jet-main#d226f0ae0583

> 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
>            Assignee: Svatopluk Dedic
>             Fix For: 9.0
>
>         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)

Mime
View raw message