diff --git a/core/trino-main/src/test/java/io/trino/sql/gen/TestExpressionCompiler.java b/core/trino-main/src/test/java/io/trino/sql/gen/TestExpressionCompiler.java index 594ef115a5c9..0290da73cbec 100644 --- a/core/trino-main/src/test/java/io/trino/sql/gen/TestExpressionCompiler.java +++ b/core/trino-main/src/test/java/io/trino/sql/gen/TestExpressionCompiler.java @@ -321,8 +321,8 @@ public void testBinaryOperatorsBoolean() assertExecute("nullif(cast(null as boolean), true)", BOOLEAN, null); for (Boolean left : booleanValues) { for (Boolean right : booleanValues) { - assertExecute(generateExpression("%s = %s", left, right), BOOLEAN, left == null || right == null ? null : left == right); - assertExecute(generateExpression("%s <> %s", left, right), BOOLEAN, left == null || right == null ? null : left != right); + assertExecute(generateExpression("%s = %s", left, right), BOOLEAN, left == null || right == null ? null : left.equals(right)); + assertExecute(generateExpression("%s <> %s", left, right), BOOLEAN, left == null || right == null ? null : !left.equals(right)); assertExecute(generateExpression("nullif(%s, %s)", left, right), BOOLEAN, nullIf(left, right)); assertExecute(generateExpression("%s is distinct from %s", left, right), BOOLEAN, !Objects.equals(left, right)); diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestSerDeUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestSerDeUtils.java index b3a4a2aa0cc9..d31c937e7703 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestSerDeUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestSerDeUtils.java @@ -75,11 +75,13 @@ public class TestSerDeUtils { private final BlockEncodingSerde blockEncodingSerde = new TestingBlockEncodingSerde(); + @SuppressWarnings("UnusedVariable") // these fields are serialized to a Block and verified there private static class ListHolder { List array; } + @SuppressWarnings("UnusedVariable") // these fields are serialized to a Block and verified there private static class InnerStruct { public InnerStruct(Integer intVal, Long longVal) @@ -92,6 +94,7 @@ public InnerStruct(Integer intVal, Long longVal) Long longVal; } + @SuppressWarnings("UnusedVariable") // these fields are serialized to a Block and verified there private static class OuterStruct { Byte byteVal; diff --git a/pom.xml b/pom.xml index bda1c0e0068e..5a2c42385836 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ 6.9.0 187 2.0.0 - 2.11.0 + 2.12.0 1.16.3 1.0.8 3.2.12 @@ -1880,7 +1880,6 @@ -Xep:BoxedPrimitiveConstructor:ERROR \ -Xep:ClassCanBeStatic:ERROR \ -Xep:CompareToZero:ERROR \ - -Xep:DoubleBraceInitialization:ERROR \ -Xep:EqualsGetClass:OFF \ -Xep:EqualsIncompatibleType:ERROR \ -Xep:FallThrough:ERROR \ diff --git a/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/cli/TestOptionsPrinter.java b/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/cli/TestOptionsPrinter.java index 6a6e9f7b5150..e1bd087930e0 100644 --- a/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/cli/TestOptionsPrinter.java +++ b/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/cli/TestOptionsPrinter.java @@ -75,6 +75,7 @@ public void shouldFormatOptionalValues() assertThat(OptionsPrinter.format(new OptionalFields(null))).isEqualTo(""); } + @SuppressWarnings("UnusedVariable") // these fields are used for validation testing private static class Options { @Option(names = "--value", paramLabel = "", description = "Test value") @@ -94,6 +95,7 @@ public Options(String value, boolean valueBoolean, List arguments) } } + @SuppressWarnings("UnusedVariable") // these fields are used for validation testing private static class NegatableOptions { @Option(names = "--no-negatable", paramLabel = "", description = "Test value boolean", negatable = true) @@ -105,6 +107,7 @@ public NegatableOptions(boolean valueBoolean) } } + @SuppressWarnings("UnusedVariable") // these fields are used for validation testing private static class OptionalFields { @Option(names = "--value", paramLabel = "", description = "Test optional value")