AHeise commented on a change in pull request #10889: 
[Flink-15355][plugins]Enable s3 plugins under Java 11.
URL: https://github.com/apache/flink/pull/10889#discussion_r368887066
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/core/plugin/PluginLoader.java
 ##########
 @@ -182,5 +184,16 @@ private boolean isAllowedFlinkClass(final String name) {
                private boolean isAllowedFlinkResource(final String name) {
                        return 
Arrays.stream(allowedResourcePrefixes).anyMatch(name::startsWith);
                }
+
+               static {
+                       ClassLoader platformLoader = null;
+                       try {
+                               platformLoader = (ClassLoader) ClassLoader.class
+                                       .getMethod("getPlatformClassLoader")
+                                       .invoke(null);
+                       } catch (Exception e) {
+                       }
 
 Review comment:
   This will always fail on Java 8, so not sure what to handle here. I also 
looked into detecting the Java version and do only specific stuff, but 
everything is more fragile than just trying.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to