Skip to content

Commit

Permalink
Consistent empty braces formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
losipiuk committed Oct 31, 2024
1 parent 889f590 commit 4417f07
Show file tree
Hide file tree
Showing 159 changed files with 223 additions and 668 deletions.
8 changes: 2 additions & 6 deletions client/trino-cli/src/main/java/io/trino/cli/NullPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ public class NullPrinter
implements OutputPrinter
{
@Override
public void printRows(List<List<?>> rows, boolean complete)
{
}
public void printRows(List<List<?>> rows, boolean complete) {}

@Override
public void finish()
{
}
public void finish() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ class MemoryCachedKnownToken
private final Lock writeLock = lock.writeLock();
private Optional<Token> knownToken = Optional.empty();

private MemoryCachedKnownToken()
{
}
private MemoryCachedKnownToken() {}

@Override
public Optional<Token> getToken()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public TokenPollResult pollForToken(URI tokenUri, Duration timeout)
}

@Override
public void tokenReceived(URI tokenUri)
{
}
public void tokenReceived(URI tokenUri) {}
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

public class TestingRedirectHandlerInjector
{
private TestingRedirectHandlerInjector()
{
}
private TestingRedirectHandlerInjector() {}

public static void setRedirectHandler(Consumer<URI> redirectHandler)
{
Expand Down
4 changes: 1 addition & 3 deletions core/trino-main/src/main/java/io/trino/TrinoMediaTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@ public final class TrinoMediaTypes
public static final String TRINO_PAGES = "application/x-trino-pages";
public static final MediaType TRINO_PAGES_TYPE = MediaType.create("application", "x-trino-pages");

private TrinoMediaTypes()
{
}
private TrinoMediaTypes() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ public final class BlockSerdeUtil
public static final MethodHandle READ_BLOCK = methodHandle(BlockSerdeUtil.class, "readBlock", BlockEncodingSerde.class, Slice.class);
public static final MethodHandle READ_BLOCK_VALUE = methodHandle(BlockSerdeUtil.class, "readBlockValue", BlockEncodingSerde.class, Type.class, Slice.class);

private BlockSerdeUtil()
{
}
private BlockSerdeUtil() {}

public static Block readBlock(BlockEncodingSerde blockEncodingSerde, Slice slice)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ public class NoOpFailureInjector
implements FailureInjector
{
@Override
public void injectTaskFailure(String traceToken, int stageId, int partitionId, int attemptId, InjectedFailureType injectionType, Optional<ErrorType> errorType)
{
}
public void injectTaskFailure(String traceToken, int stageId, int partitionId, int attemptId, InjectedFailureType injectionType, Optional<ErrorType> errorType) {}

@Override
public Optional<InjectedFailure> getInjectedFailure(String traceToken, int stageId, int partitionId, int attemptId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ public SplitPlacementResult computeAssignments(Set<Split> splits)
}

@Override
public void lockDownNodes()
{
}
public void lockDownNodes() {}

@Override
public List<InternalNode> allNodes()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ public interface TaskLifecycleListener
TaskLifecycleListener NO_OP = new TaskLifecycleListener()
{
@Override
public void taskCreated(PlanFragmentId fragmentId, RemoteTask task)
{
}
public void taskCreated(PlanFragmentId fragmentId, RemoteTask task) {}

@Override
public void noMoreTasks(PlanFragmentId fragmentId)
{
}
public void noMoreTasks(PlanFragmentId fragmentId) {}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -803,9 +803,7 @@ public long getRetainedSizeInBytes()
}

@Override
public void close()
{
}
public void close() {}
}

@NotThreadSafe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public Operator createOperator(DriverContext driverContext)
}

@Override
public void noMoreOperators()
{
}
public void noMoreOperators() {}

@Override
public OperatorFactory duplicate()
Expand Down Expand Up @@ -72,9 +70,7 @@ public boolean needsInput()
}

@Override
public void addInput(Page page)
{
}
public void addInput(Page page) {}

@Override
public Page getOutput()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public OperatorContext getOperatorContext()
}

@Override
public void finish()
{
}
public void finish() {}

@Override
public boolean isFinished()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ default ListenableFuture<Void> startMemoryRevoke()
* Clean up and release resources after completed memory revoking. Called by driver
* once future returned by startMemoryRevoke is completed.
*/
default void finishMemoryRevoke()
{
}
default void finishMemoryRevoke() {}

/**
* Notifies the operator that no more pages will be added and the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

public class PositionSearcher
{
private PositionSearcher()
{
}
private PositionSearcher() {}

/**
* @param startPosition - inclusive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ public Page getOutput()
}

@Override
public void finish()
{
}
public void finish() {}

@Override
public void close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ public final class DoubleHistogramAggregation
{
public static final int ENTRY_BUFFER_SIZE = 100;

private DoubleHistogramAggregation()
{
}
private DoubleHistogramAggregation() {}

@AccumulatorStateMetadata(stateSerializerClass = DoubleHistogramStateSerializer.class, stateFactoryClass = NumericHistogramStateFactory.class)
public interface State
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ public void updateMemory()
}

@Override
public void close()
{
}
public void close() {}

@Override
public ListenableFuture<Void> startMemoryRevoke()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,7 @@ private int findFirstNullPosition(int markerChannel)
return end;
}

public record PassThroughColumnSpecification(boolean isPartitioningColumn, int inputChannel, int indexChannel)
{
}
public record PassThroughColumnSpecification(boolean isPartitioningColumn, int inputChannel, int indexChannel) {}

private PassThroughColumnProvider createColumnProvider(PassThroughColumnSpecification specification)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,6 @@ public void appendTo(long position, PageBuilder pageBuilder, int outputChannelOf
}

@Override
public void close()
{
}
public void close() {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,5 @@ public void appendTo(long position, PageBuilder pageBuilder, int outputChannelOf
}

@Override
public void close()
{
}
public void close() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ public Operator createOperator(DriverContext driverContext)
}

@Override
public void noMoreOperators()
{
}
public void noMoreOperators() {}

@Override
public OperatorFactory duplicate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ public boolean isNull(int field)
}

@Override
public void close()
{
}
public void close() {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,5 @@ public void appendTo(long position, PageBuilder pageBuilder, int outputChannelOf
}

@Override
public void close()
{
}
public void close() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,7 @@ public boolean isJoinPositionEligible(long currentJoinPosition, int probePositio
}

@Override
public void close()
{
}
public void close() {}
}

@Immutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ public Operator createOperator(DriverContext driverContext)
}

@Override
public void noMoreOperators()
{
}
public void noMoreOperators() {}

@Override
public OperatorFactory duplicate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ public final class JsonOperators
{
private static final JsonFactory JSON_FACTORY = createJsonFactory();

private JsonOperators()
{
}
private JsonOperators() {}

@ScalarOperator(CAST)
@SqlNullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@

public class ExecutionPlanner
{
private ExecutionPlanner()
{
}
private ExecutionPlanner() {}

public static JsonTableProcessingFragment getExecutionPlan(
JsonTablePlanNode plan,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@

public class SequenceEvaluator
{
private SequenceEvaluator()
{
}
private SequenceEvaluator() {}

// creates a sequence of JSON items, and applies error handling
public static List<JsonNode> getSequence(JsonNode item, Object[] pathParameters, JsonPathEvaluator pathEvaluator, boolean errorOnError)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ public final class Bootstrap
}
}

private Bootstrap()
{
}
private Bootstrap() {}

public static CallSite bootstrap(MethodHandles.Lookup callerLookup, String name, MethodType type, long bindingId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public final class LambdaCapture
}
}

private LambdaCapture()
{
}
private LambdaCapture() {}

public static CallSite lambdaCapture(
MethodHandles.Lookup callerLookup,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ public static void forEachExpression(PlanNode plan, Consumer<Expression> express
plan.accept(new Visitor(expressionConsumer, true, noLookup()), null);
}

private ExpressionExtractor()
{
}
private ExpressionExtractor() {}

private static class Visitor
extends SimplePlanVisitor<Void>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@
*/
public class IrTypeAnalyzer
{
public IrTypeAnalyzer()
{
}
public IrTypeAnalyzer() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ final class Util
private static final CatalogSchemaFunctionName ROW_NUMBER_NAME = builtinFunctionName("row_number");
private static final CatalogSchemaFunctionName RANK_NAME = builtinFunctionName("rank");

private Util()
{
}
private Util() {}

/**
* Prune the set of available inputs to those required by the given expressions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public Operator createOperator(DriverContext driverContext)
}

@Override
public void noMoreOperators()
{
}
public void noMoreOperators() {}

@Override
public OperatorFactory duplicate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ public final class ArrayParametricType
{
public static final ArrayParametricType ARRAY = new ArrayParametricType();

private ArrayParametricType()
{
}
private ArrayParametricType() {}

@Override
public String getName()
Expand Down
Loading

0 comments on commit 4417f07

Please sign in to comment.