This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 4822de7ed821b4a23b90e81924b2719caadfe770
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Aug 9 15:18:43 2024 +0100

    Code clean-up - formatting. No functional change.
---
 java/org/apache/el/stream/Stream.java              | 26 ++++++++--------------
 .../org/apache/el/stream/StreamELResolverImpl.java |  6 ++---
 2 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/java/org/apache/el/stream/Stream.java 
b/java/org/apache/el/stream/Stream.java
index 4f9241e488..f419f1dca5 100644
--- a/java/org/apache/el/stream/Stream.java
+++ b/java/org/apache/el/stream/Stream.java
@@ -48,8 +48,7 @@ public class Stream {
             protected void findNext() {
                 while (iterator.hasNext()) {
                     Object obj = iterator.next();
-                    if (ELSupport.coerceToBoolean(null, le.invoke(obj),
-                            true).booleanValue()) {
+                    if (ELSupport.coerceToBoolean(null, le.invoke(obj), 
true).booleanValue()) {
                         next = obj;
                         foundNext = true;
                         break;
@@ -83,8 +82,7 @@ public class Stream {
 
             @Override
             protected void findNext() {
-                while (iterator.hasNext() ||
-                        (inner != null && inner.hasNext())) {
+                while (iterator.hasNext() || (inner != null && 
inner.hasNext())) {
                     if (inner == null || !inner.hasNext()) {
                         inner = ((Stream) le.invoke(iterator.next())).iterator;
                     }
@@ -343,7 +341,7 @@ public class Stream {
 
         while (iterator.hasNext()) {
             iterator.next();
-            count ++;
+            count++;
         }
 
         return Long.valueOf(count);
@@ -413,8 +411,7 @@ public class Stream {
             if ((obj instanceof Comparable)) {
                 result = (Comparable) obj;
             } else {
-                throw new ELException(
-                        MessageFactory.get("stream.compare.notComparable"));
+                throw new 
ELException(MessageFactory.get("stream.compare.notComparable"));
             }
         }
 
@@ -427,8 +424,7 @@ public class Stream {
                     result = (Comparable) obj;
                 }
             } else {
-                throw new ELException(
-                        MessageFactory.get("stream.compare.notComparable"));
+                throw new 
ELException(MessageFactory.get("stream.compare.notComparable"));
             }
         }
 
@@ -450,11 +446,9 @@ public class Stream {
 
         while (iterator.hasNext()) {
             Object obj = iterator.next();
-            if (isMax && ELSupport.coerceToNumber(null, le.invoke(obj, result),
-                    Integer.class).intValue() > 0) {
+            if (isMax && ELSupport.coerceToNumber(null, le.invoke(obj, 
result), Integer.class).intValue() > 0) {
                 result = obj;
-            } else if (!isMax && ELSupport.coerceToNumber(null, le.invoke(obj, 
result),
-                    Integer.class).intValue() < 0) {
+            } else if (!isMax && ELSupport.coerceToNumber(null, le.invoke(obj, 
result), Integer.class).intValue() < 0) {
                 result = obj;
             }
         }
@@ -467,8 +461,7 @@ public class Stream {
     }
 
 
-    private static class LambdaExpressionComparator
-            implements Comparator<Object> {
+    private static class LambdaExpressionComparator implements 
Comparator<Object> {
 
         private final LambdaExpression le;
 
@@ -478,8 +471,7 @@ public class Stream {
 
         @Override
         public int compare(Object o1, Object o2) {
-            return ELSupport.coerceToNumber(
-                    null, le.invoke(o1, o2), Integer.class).intValue();
+            return ELSupport.coerceToNumber(null, le.invoke(o1, o2), 
Integer.class).intValue();
         }
     }
 
diff --git a/java/org/apache/el/stream/StreamELResolverImpl.java 
b/java/org/apache/el/stream/StreamELResolverImpl.java
index dd26066372..c4531b5680 100644
--- a/java/org/apache/el/stream/StreamELResolverImpl.java
+++ b/java/org/apache/el/stream/StreamELResolverImpl.java
@@ -37,8 +37,7 @@ public class StreamELResolverImpl extends ELResolver {
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property,
-            Object value) {
+    public void setValue(ELContext context, Object base, Object property, 
Object value) {
         // NO-OP
     }
 
@@ -53,8 +52,7 @@ public class StreamELResolverImpl extends ELResolver {
     }
 
     @Override
-    public Object invoke(ELContext context, Object base, Object method,
-            Class<?>[] paramTypes, Object[] params) {
+    public Object invoke(ELContext context, Object base, Object method, 
Class<?>[] paramTypes, Object[] params) {
 
         if ("stream".equals(method) && params.length == 0) {
             if (base.getClass().isArray()) {


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

Reply via email to