[ https://issues.apache.org/jira/browse/FLINK-17530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105420#comment-17105420 ]
Robert Metzger commented on FLINK-17530: ---------------------------------------- I had an offline discussion with Stephan Ewen about this. He also prefers option C) "Change ClosureCleaner". He proposed to change the behavior of ClosureCleaner to ignore fields from the "java.base" module unless they are a known collection type (Iterable, Map, ...) [~aljoscha] what do you think? > 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)