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 10:53:28 UTC

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

markt-asf commented on a change in pull request #273:
URL: https://github.com/apache/tomcat/pull/273#discussion_r413715418



##########
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:
       These formatting changes need to be removed from this PR. Tomcat coding convention is to use `} else {` on a single line.




----------------------------------------------------------------
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