You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by lz...@apache.org on 2022/07/06 12:46:41 UTC

[flink-table-store] branch master updated: [hotfix] Fix ClassLoader in FileFormat.fromIdentifier

This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git


The following commit(s) were added to refs/heads/master by this push:
     new 84cf748e [hotfix] Fix ClassLoader in FileFormat.fromIdentifier
84cf748e is described below

commit 84cf748e847de4524bfaf165ee59c84da3fe636d
Author: JingsongLi <lz...@aliyun.com>
AuthorDate: Wed Jul 6 20:46:12 2022 +0800

    [hotfix] Fix ClassLoader in FileFormat.fromIdentifier
---
 .../src/main/java/org/apache/flink/table/store/format/FileFormat.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flink-table-store-common/src/main/java/org/apache/flink/table/store/format/FileFormat.java b/flink-table-store-common/src/main/java/org/apache/flink/table/store/format/FileFormat.java
index 98fd4103..4fad3648 100644
--- a/flink-table-store-common/src/main/java/org/apache/flink/table/store/format/FileFormat.java
+++ b/flink-table-store-common/src/main/java/org/apache/flink/table/store/format/FileFormat.java
@@ -109,7 +109,7 @@ public abstract class FileFormat {
     private static Optional<FileFormat> fromIdentifier(
             String formatIdentifier, Configuration formatOptions, ClassLoader classLoader) {
         ServiceLoader<FileFormatFactory> serviceLoader =
-                ServiceLoader.load(FileFormatFactory.class, FileFormat.class.getClassLoader());
+                ServiceLoader.load(FileFormatFactory.class, classLoader);
         for (FileFormatFactory factory : serviceLoader) {
             if (factory.identifier().equals(formatIdentifier.toLowerCase())) {
                 return Optional.of(factory.create(formatOptions));