Skip to content

Commit 716e7de

Browse files
committed
Simplify implementation of SpelNodeImpl.loadClassForExitDescriptor(...)
1 parent f7a6a7b commit 716e7de

File tree

1 file changed

+3
-1
lines changed
  • spring-expression/src/main/java/org/springframework/expression/spel/ast

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ private static Class<?> loadClassForExitDescriptor(@Nullable String exitDescript
308308
return null;
309309
}
310310
String typeDescriptor = exitDescriptor;
311-
if (typeDescriptor.startsWith("[") || typeDescriptor.startsWith("L")) {
311+
// If the SpEL exitDescriptor is not for a primitive (single character),
312+
// ASM expects the typeDescriptor to end with a ';'.
313+
if (typeDescriptor.length() > 1) {
312314
typeDescriptor += ";";
313315
}
314316
String className = Type.getType(typeDescriptor).getClassName();

0 commit comments

Comments
 (0)