use of ninja.ControllerMethods.ControllerMethod1 in project ninja by ninjaframework.
the class LambdasTest method anonymousClassReference.
@Test
public void anonymousClassReference() throws Exception {
@SuppressWarnings("Convert2Lambda") ControllerMethod1<Context> lambda = new ControllerMethod1<Context>() {
@Override
public Result apply(Context a) {
return Results.html().renderRaw("".getBytes(StandardCharsets.UTF_8));
}
};
try {
LambdaInfo lambdaInfo = Lambdas.reflect(lambda);
fail();
} catch (IllegalArgumentException e) {
// expected
}
}
Aggregations