sruehl commented on code in PR #2382:
URL: https://github.com/apache/plc4x/pull/2382#discussion_r2660878810


##########
plc4j/spi/buffers/ascii-box/src/main/java/org/apache/plc4x/java/spi/buffers/asciiboxbased/utils/ascii/AsciiBoxWriter.java:
##########
@@ -235,16 +229,12 @@ public AsciiBox boxBelowBox(AsciiBox box1, AsciiBox box2) 
{
     }
 
     AsciiBox mergeHorizontal(List<AsciiBox> boxes) {
-        switch (boxes.size()) {
-            case 0:
-                return new AsciiBox("");
-            case 1:
-                return boxes.get(0);
-            case 2:
-                return boxSideBySide(boxes.get(0), boxes.get(1));
-            default:
-                return boxSideBySide(boxes.get(0), mergeHorizontal(new 
ArrayList<>(boxes).subList(1, boxes.size())));
-        }
+        return switch (boxes.size()) {

Review Comment:
   really like the new syntax... :)



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to