Github user dawidwys commented on a diff in the pull request: https://github.com/apache/flink/pull/6120#discussion_r201657797 --- Diff: flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java --- @@ -695,29 +678,14 @@ private static void registerFactory(Type t, Class<? extends TypeInfoFactory> fac Preconditions.checkArgument( lambdaOutputTypeArgumentIndices != null, "Indices for output type arguments within lambda not provided"); - // check for lambda type erasure - validateLambdaGenericParameters(exec); final Method sam = TypeExtractionUtils.getSingleAbstractMethod(baseClass); final int baseParametersLen = sam.getParameterTypes().length; // parameters must be accessed from behind, since JVM can add additional parameters e.g. when using local variables inside lambda function final int paramLen = exec.getParameterTypes().length; - final Type input1 = TypeExtractionUtils.extractTypeFromLambda( --- End diff -- Same comments as above. Why don't check the input types, if not checking them the lambda input indices not necessary.
---