Skip to content

Commit

Permalink
Migrate AbstractTestingPrestoClient.java to use lambdas
Browse files Browse the repository at this point in the history
  • Loading branch information
cberner committed Oct 13, 2015
1 parent c99c12b commit 8dde8b5
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,13 @@ protected List<Type> getTypes(List<Column> columns)

protected Function<Column, Type> columnTypeGetter()
{
return new Function<Column, Type>()
{
@Override
public Type apply(Column column)
{
String typeName = column.getType();
Type type = prestoServer.getMetadata().getType(parseTypeSignature(typeName));
if (type == null) {
throw new AssertionError("Unhandled type: " + typeName);
}
return type;
return column -> {
String typeName = column.getType();
Type type = prestoServer.getMetadata().getType(parseTypeSignature(typeName));
if (type == null) {
throw new AssertionError("Unhandled type: " + typeName);
}
return type;
};
}
}

0 comments on commit 8dde8b5

Please sign in to comment.