[
https://issues.apache.org/jira/browse/BEAM-6007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17164010#comment-17164010
]
Kenneth Knowles commented on BEAM-6007:
---------------------------------------
Hmm, just getting to reading about this. A very basic reading has me worried.
- the necessary replacement class may only be available in Java 9+ so we
cannot migrate to it unless we drop Java 8 support
- in our DoFnInvoker we deliberately do create a class in the same package
(actually as an inner class) as a user's class so it can call package private
methods and whatnot (see
https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/StableInvokerNamingStrategy.java)
I will try to recover the context. It is very old. But we did have cases where
we wanted the invoker to have privileged access. I think we simply have to
eliminate those cases and force users to set everything necessary to public and
define the class in some Beam package. I think there may be a module system
solution too, but keeping it simple seems better.
> Create ClassLoadingStrategy with Java 11 compatible way
> -------------------------------------------------------
>
> Key: BEAM-6007
> URL: https://issues.apache.org/jira/browse/BEAM-6007
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-java-core
> Reporter: Keisuke Kondo
> Priority: P2
>
> Since sun.misc.Unsafe API was deprecated in Java 11,
>
> {code:java}
> ClassLoadingStrategy.Default.INJECTION{code}
> is not work with Java 11.
> Author of byte-buddy library shared way to make it compatible with Java 11 on
> his blog post. (and way to keep compatibility with java 9 and prior version)
> [http://mydailyjava.blogspot.com/2018/04/jdk-11-and-proxies-in-world-past.html]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)