On the way to Spring 6 and java 17 - refactoring the class CodeFlow. Instead of if-else, I added more readable switch expressions.

Comment From: pivotal-cla

@r331 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@r331 Thank you for signing the Contributor License Agreement!

Comment From: sbrannen

@r331, for future reference please ensure that you always run a full local build before submitting a PR.

For example, this PR actually fails the build due to Checkstyle violations.

[ant:checkstyle] [ERROR] /Users/xyz/spring-framework/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java:349:17: 'if' construct must use '{}'s. [NeedBraces]
[ant:checkstyle] [ERROR] /Users/xyz/spring-framework/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java:371: Line has leading space characters; indentation should be performed with tabs only. [RegexpSinglelineJava]
[ant:checkstyle] [ERROR] /Users/xyz/spring-framework/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java:382: Line has leading space characters; indentation should be performed with tabs only. [RegexpSinglelineJava]
[ant:checkstyle] [ERROR] /Users/xyz/spring-framework/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java:393: Line has leading space characters; indentation should be performed with tabs only. [RegexpSinglelineJava]

Comment From: sbrannen

This has been merged into main in dcda127b60305aeaec1104de85c98a451972e137 and revised in bc583ea74fef84af98181494d8bcaa869961146b.

Thanks