You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (Jira)" <ji...@apache.org> on 2021/03/12 09:45:00 UTC

[jira] [Created] (OWB-1375) improve support for Java 9++ hacks

Mark Struberg created OWB-1375:
----------------------------------

             Summary: improve support for Java 9++ hacks
                 Key: OWB-1375
                 URL: https://issues.apache.org/jira/browse/OWB-1375
             Project: OpenWebBeans
          Issue Type: Improvement
          Components: Core
    Affects Versions: 2.0.21
            Reporter: Mark Struberg
            Assignee: Mark Struberg
             Fix For: 2.0.22


With Java > 11 sun.misc.Unsafe defineClass finally got removed and setAccessible(true) for java.* classes is not allowed anymore.

There is a solution via ClassLoaderProxyService as DefiningClassService (see OWB-1325) but this has the downside that package scoped methods are not accessible. A call to a package scope method of a NormalScope proxy thus cannot see the method in the proxy class and thus coerces to the empty original parent class. As this instance is not initialised all values are empty, resulting in NPE and zero values etc.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)