Skip to content

Commit

Permalink
[FLINK-15739] Fix TypeSerializerUpgradeTestBase on Java 12
Browse files Browse the repository at this point in the history
The problem was that some of the relocated classes in
PojoSerializerUpgradeTest have enums in them. Java 12 introduced the
EnumDesc class and enums will have an inner subclass of this defined
that does not have a ClassLoader. We now filter out classes that don't
have a classloader in the ClassRelocator because these classes don't
have bytecode that we could relocate.
  • Loading branch information
aljoscha committed Jan 27, 2020
1 parent 53f956f commit 391dd4c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Map<String, byte[]> remap() {

return renaming.getDefinedClassesUnderRoot()
.stream()
.filter(klass -> klass.getClassLoader() != null)
.collect(Collectors.toMap(renaming::newNameFor, classToTransform -> {
ClassReader providerClassReader = classReaderFor(classToTransform);
ClassWriter transformedProvider = remap(renames, providerClassReader);
Expand Down

0 comments on commit 391dd4c

Please sign in to comment.