Commit 554a6c6
committed
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
```1 parent c4659f1 commit 554a6c6
File tree
1 file changed
+3
-2
lines changed- japicmp/src/main/java/japicmp/output/markdown
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
| 387 | + | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| |||
0 commit comments