pnowojski 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_r368895613
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/core/plugin/PluginLoader.java
 ##########
 @@ -182,5 +184,20 @@ 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 (NoSuchMethodException e) {
 
 Review comment:
   Maybe this?
   
https://www.journaldev.com/20930/check-java-version#can-we-check-java-version-programmatically
   but I'm also kind of fine with as it is.

----------------------------------------------------------------
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