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_r368888941
##########
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:
@pnowojski What do you think of the exception handling now? Do you have any
reliable way to detect if we are on Java9+?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services