You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GitBox <gi...@apache.org> on 2020/04/23 17:23:46 UTC

[GitHub] [tomcat] larsgrefer commented on a change in pull request #273: Use enhanced for loops where possible

larsgrefer commented on a change in pull request #273:
URL: https://github.com/apache/tomcat/pull/273#discussion_r413983378



##########
File path: java/jakarta/el/Util.java
##########
@@ -380,11 +380,12 @@ static Method findMethod(Class<?> clazz, Object base, String methodName,
     private static final String paramString(Class<?>[] types) {
         if (types != null) {
             StringBuilder sb = new StringBuilder();
-            for (int i = 0; i < types.length; i++) {
-                if (types[i] == null) {
+            for (Class<?> type : types) {
+                if (type == null) {
                     sb.append("null, ");
-                } else {
-                    sb.append(types[i].getName()).append(", ");
+                }
+                else {

Review comment:
       The if-else formatting should be fixed now




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org