Skip to content

Commit

Permalink
Convert QueryRunner to a record
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed May 25, 2024
1 parent 553d8fd commit 459fa06
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,11 @@ private static Map<String, String> getRpmMetadata(GenericContainer<?> container,
return builder.buildOrThrow();
}

private static class QueryRunner
private record QueryRunner(String host, int port)
{
private final String host;
private final int port;

private QueryRunner(String host, int port)
private QueryRunner
{
this.host = requireNonNull(host, "host is null");
this.port = port;
requireNonNull(host, "host is null");
}

public Set<List<String>> execute(String sql)
Expand Down

0 comments on commit 459fa06

Please sign in to comment.