[ 
https://issues.apache.org/jira/browse/FLINK-17530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17106002#comment-17106002
 ] 

Aljoscha Krettek commented on FLINK-17530:
------------------------------------------

I think A) is not an option. We should not assume that we are always in control 
of how our Java processes are started, think for example if people have custom 
docker scripts that start Java processes, the future "as-a-library" mode, where 
Flink can be embedded in some other Java application.

I personally would like to remove the {{ClosureCleaner}} because of its added 
complexity but I don't think that's an option. 😅

So I would second Stephans opinion of ignoring stuff from "java.base".

> Fix illegal reflective access by ClosureCleaner
> -----------------------------------------------
>
>                 Key: FLINK-17530
>                 URL: https://issues.apache.org/jira/browse/FLINK-17530
>             Project: Flink
>          Issue Type: Sub-task
>          Components: API / DataStream
>    Affects Versions: 1.11.0
>            Reporter: Robert Metzger
>            Assignee: Robert Metzger
>            Priority: Major
>             Fix For: 1.11.0
>
>
> To reproduce:
> {code}
>       @Test
>       public void testJava11Warning() {
>               MapFunction<String, String> fun = new MapFunction<String, 
> String>() {
>                       String field = "asdf";
>                       @Override
>                       public String map(String value) throws Exception {
>                               return value + field;
>                       }
>               };
>               ClosureCleaner.clean(fun, 
> ExecutionConfig.ClosureCleanerLevel.RECURSIVE, false);
>       }
> {code}
> Causes:
> {code}
> WARNING: Illegal reflective access by 
> org.apache.flink.api.java.ClosureCleaner 
> (file:/Users/robert/Projects/flink/flink-core/target/classes/) to field 
> java.lang.String.value
>       at 
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:104)
>       at 
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
>       at 
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:71)
>       at 
> org.apache.flink.api.java.ClosureCleanerTest.testJava11Warning(ClosureCleanerTest.java:58)
> {code}



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

Reply via email to