Polish contribution

See gh-36367

(cherry picked from commit b1cb9c5052)
This commit is contained in:
Sam Brannen
2026-02-23 17:33:15 +01:00
parent 7768cee7a0
commit f87b5ee326
2 changed files with 8 additions and 5 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2026-present the original author or authors.
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ public class ListConcatenation implements OperatorOverloader {
@Override
public boolean overridesOperation(Operation operation, Object left, Object right) {
return operation == Operation.ADD && left instanceof List && right instanceof List;
return (operation == Operation.ADD && left instanceof List && right instanceof List);
}
@Override
@@ -43,4 +43,5 @@ public class ListConcatenation implements OperatorOverloader {
"No overload for operation %s and operands [%s] and [%s]"
.formatted(operation, left, right));
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2026-present the original author or authors.
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,8 @@ class ListConcatenation: OperatorOverloader {
return left + right
}
throw UnsupportedOperationException("No overload for operation $operation and operands [$left] and [$right]")
throw UnsupportedOperationException(
"No overload for operation $operation and operands [$left] and [$right]")
}
}
}