Skip to content

Commit

Permalink
Fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Boerman committed Dec 25, 2024
1 parent c203fcb commit b8434e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ private static void collectionToLiveType(IScalaPluginClassLoader pluginClassLoad
if ("java/util/EnumSet".equals(implementationClassName)) {
//special-case EnumSet because has no nullary constructor.
methodVisitor.visitLdcInsn(Type.getType(elementTypeSignature.toDescriptor())); operandStack.push(Type.getType(Class.class));
methodVisitor.visitMethodInsn(INVOKESTATIC, "java/util/EnumSet", "noneOf", "(Ljava/langClass;)Ljava/util/EnumSet;", false); operandStack.replaceTop(Type.getType(EnumSet.class));
methodVisitor.visitMethodInsn(INVOKESTATIC, "java/util/EnumSet", "noneOf", "(Ljava/lang/Class;)Ljava/util/EnumSet;", false); operandStack.replaceTop(Type.getType(EnumSet.class));
} else {
//call nullary constructor (this may fail at runtime with a NoSuchMethodDefError) //TODO generate try-catch code?
methodVisitor.visitTypeInsn(NEW, implementationClassName); operandStack.push(Type.getObjectType(collectionTypeName));
Expand Down

0 comments on commit b8434e6

Please sign in to comment.