Skip to content

Commit

Permalink
Make utility classes final
Browse files Browse the repository at this point in the history
  • Loading branch information
vagaerg committed Nov 30, 2023
1 parent d9012e3 commit 0365917
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import static io.trino.plugin.opa.TestHelpers.createIllegalResponseTestCases;

public class FilteringTestHelpers
public final class FilteringTestHelpers
{
private FilteringTestHelpers() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,18 @@
*/
package io.trino.plugin.opa;

public class FunctionalHelpers
public final class FunctionalHelpers
{
public interface Consumer3<T1, T2, T3>
{
void accept(T1 t1, T2 t2, T3 t3);
}

public interface Function3<T1, T2, T3, R>
{
R apply(T1 t1, T2 t2, T3 t3);
}

public interface Consumer4<T1, T2, T3, T4>
{
void accept(T1 t1, T2 t2, T3 t3, T4 t4);
}

public interface Consumer5<T1, T2, T3, T4, T5>
{
void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5);
}

public interface Consumer6<T1, T2, T3, T4, T5, T6>
{
void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6);
}

public record Pair<T, U>(T first, U second)
{
public static <T, U> Pair<T, U> of(T first, U second)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import static com.google.common.net.MediaType.JSON_UTF_8;
import static java.util.Objects.requireNonNull;

public class HttpClientUtils
public final class HttpClientUtils
{
private HttpClientUtils() {}

Expand Down Expand Up @@ -93,7 +93,7 @@ public List<JsonNode> getRequests()
}
}

public static class InstrumentedHttpClient
public static final class InstrumentedHttpClient
extends TestingHttpClient
{
private final RecordingHttpProcessor httpProcessor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import static io.trino.plugin.opa.TestHelpers.SYSTEM_ACCESS_CONTROL_CONTEXT;
import static org.assertj.core.api.Assertions.assertThat;

public class RequestTestUtilities
public final class RequestTestUtilities
{
private RequestTestUtilities() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.common.net.MediaType.JSON_UTF_8;

public class TestHelpers
public final class TestHelpers
{
private TestHelpers() {}

Expand Down

0 comments on commit 0365917

Please sign in to comment.