Browse Source

Simplify implementation of SpelNodeImpl.loadClassForExitDescriptor(...)

pull/32829/head
Sam Brannen 2 years ago
parent
commit
716e7de841
  1. 4
      spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java

4
spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java

@ -308,7 +308,9 @@ public abstract class SpelNodeImpl implements SpelNode, Opcodes {
return null; return null;
} }
String typeDescriptor = exitDescriptor; String typeDescriptor = exitDescriptor;
if (typeDescriptor.startsWith("[") || typeDescriptor.startsWith("L")) { // If the SpEL exitDescriptor is not for a primitive (single character),
// ASM expects the typeDescriptor to end with a ';'.
if (typeDescriptor.length() > 1) {
typeDescriptor += ";"; typeDescriptor += ";";
} }
String className = Type.getType(typeDescriptor).getClassName(); String className = Type.getType(typeDescriptor).getClassName();

Loading…
Cancel
Save