RFR: 8203892: Target interface added as marker interface in calls to altMetafactory (original) (raw)
Vicente Romero vicente.romero at oracle.com
Mon May 28 20:09:10 UTC 2018
- Previous message: RFR: 8202178(type.getKind() for var is None instead of Error)
- Next message: RFR: 8203892: Target interface added as marker interface in calls to altMetafactory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Please review the fix for [1], which is a regression provoked by [2]. The fix can be find at [3]. The regression could be reproduced with this test case:
import java.util.; import java.util.function.; import java.io.*;
class Test { public static Comparator comparingInt(ToIntFunction<? super T> keyExtractor) { Objects.requireNonNull(keyExtractor); return (Comparator & Serializable) (c1, c2) -> Integer.compare(keyExtractor.applyAsInt(c1), keyExtractor.applyAsInt(c2)); } }
in this case javac generates a BSM to the alternative metafactory, but after the change for [2] the target type was included as one of the marker interfaces. This patch fixes that issue.
TIA, Vicente
[1] https://bugs.openjdk.java.net/browse/JDK-8203892 [2] https://bugs.openjdk.java.net/browse/JDK-8148354 [3] http://cr.openjdk.java.net/~vromero/8203892/webrev.00/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180528/f416ca78/attachment.html>
- Previous message: RFR: 8202178(type.getKind() for var is None instead of Error)
- Next message: RFR: 8203892: Target interface added as marker interface in calls to altMetafactory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]