Skip to content

Commit

Permalink
Remove obsolete suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
martint committed Aug 27, 2023
1 parent 4490238 commit 945cb41
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import static io.trino.cli.TestAlignedTablePrinter.rows;
import static org.testng.Assert.assertEquals;

@SuppressWarnings("Duplicates")
public class TestVerticalRecordPrinter
{
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ public void setTransactionIsolation(int level)
isolationLevel.set(level);
}

@SuppressWarnings("MagicConstant")
@Override
public int getTransactionIsolation()
throws SQLException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public boolean isNull()
return tokens[columnIndex].isEmpty();
}

@SuppressWarnings("SimplifiableConditionalExpression")
@Override
public boolean getBoolean()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ public boolean isNull(int field)
}
}

@SuppressWarnings("UnusedDeclaration")
@Override
public void close()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ public HudiCompactionOperation.Builder setMetrics(Map<String, Double> metrics)
return this;
}

@SuppressWarnings("unchecked")
public HudiCompactionOperation build()
{
return new HudiCompactionOperation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,14 @@ public static PartitionSpec parsePartitionFields(Schema schema, List<String> fie

public static void parsePartitionField(PartitionSpec.Builder builder, String field)
{
@SuppressWarnings("PointlessBooleanExpression")
boolean matched = false ||
tryMatch(field, IDENTITY_PATTERN, match -> builder.identity(fromIdentifierToColumn(match.group()))) ||
boolean matched = tryMatch(field, IDENTITY_PATTERN, match -> builder.identity(fromIdentifierToColumn(match.group()))) ||
tryMatch(field, YEAR_PATTERN, match -> builder.year(fromIdentifierToColumn(match.group(1)))) ||
tryMatch(field, MONTH_PATTERN, match -> builder.month(fromIdentifierToColumn(match.group(1)))) ||
tryMatch(field, DAY_PATTERN, match -> builder.day(fromIdentifierToColumn(match.group(1)))) ||
tryMatch(field, HOUR_PATTERN, match -> builder.hour(fromIdentifierToColumn(match.group(1)))) ||
tryMatch(field, BUCKET_PATTERN, match -> builder.bucket(fromIdentifierToColumn(match.group(1)), parseInt(match.group(2)))) ||
tryMatch(field, TRUNCATE_PATTERN, match -> builder.truncate(fromIdentifierToColumn(match.group(1)), parseInt(match.group(2)))) ||
tryMatch(field, VOID_PATTERN, match -> builder.alwaysNull(fromIdentifierToColumn(match.group(1)))) ||
false;
tryMatch(field, VOID_PATTERN, match -> builder.alwaysNull(fromIdentifierToColumn(match.group(1))));
if (!matched) {
throw new IllegalArgumentException("Invalid partition field declaration: " + field);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public final class OracleDataTypes
{
private OracleDataTypes() {}

@SuppressWarnings("MisusedWeekYear")
public static DataType<ZonedDateTime> oracleTimestamp3TimeZoneDataType()
{
return dataType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@ public void testTablesSystemTable()
assertEquals(computeActual("SELECT * FROM system.tables WHERE table_schema IN ('foo', 'bar')").getRowCount(), 0);
}

@SuppressWarnings("OverlyStrongTypeCast")
@Test
public void testTableStatsSystemTable()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ public void testWindowFunctionWithImplicitCoercion()
assertQuery("SELECT *, 1.0 * sum(x) OVER () FROM (VALUES 1) t(x)", "SELECT 1, 1.0");
}

@SuppressWarnings("PointlessArithmeticExpression")
@Test
public void testWindowFunctionsExpressions()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public abstract class BaseConnectorSmokeTest

/**
* Make sure to group related behaviours together in the order and grouping they are declared in {@link TestingConnectorBehavior}.
* If required, annotate the method with {@code @SuppressWarnings("DuplicateBranchesInSwitch")}.
*/
protected boolean hasBehavior(TestingConnectorBehavior connectorBehavior)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ protected MockConnectorPlugin buildMockConnectorPlugin()

/**
* Make sure to group related behaviours together in the order and grouping they are declared in {@link TestingConnectorBehavior}.
* If required, annotate the method with {@code @SuppressWarnings("DuplicateBranchesInSwitch")}.
*/
protected boolean hasBehavior(TestingConnectorBehavior connectorBehavior)
{
Expand Down

0 comments on commit 945cb41

Please sign in to comment.