Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract complex expression to help JDK 8 make sense of the Java types
Full explanation: JDK 8 doesn't realize we want to handle a stream of `JApiCompatibility` elements. Instead, the compiler thinks we want to create a stream of `JApiHasChangeStatus` elements. So I just extracted the complex expression to a constant with the appropriate type and it works fine. Other JDK versions get it right without the type hint. ¯\_(ツ)_/¯ Root cause of the problem: ``` Caused by: java.lang.invoke.LambdaConversionException: Invalid receiver type interface japicmp.model.JApiHasChangeStatus; not a subtype of implementation type interface japicmp.model.JApiCompatibility at java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:233) at java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:303) at java.lang.invoke.CallSite.makeSite(CallSite.java:302) ... 54 more ```
- Loading branch information