retrolambda icon indicating copy to clipboard operation
retrolambda copied to clipboard

Should show warning if java.util.function.* is used

Open rmtmckenzie opened this issue 7 years ago • 3 comments

It would be extraordinarily useful if retrolambda spit out a warning if java.util.function.* functions or other known backwords-incompatible code is found.

This could be configurable to either not show warnings or throw errors instead, but if it warned by default I think it would stop a lot of people from running into the problem by accident and simply having the application crash at runtime, as I would imaging that pretty much every platform that you'd use retrolambda for wouldn't have java.util.function.*. Most of the time the errors that occur are pretty indecipherable unless you already know that this is a problem.

rmtmckenzie avatar Apr 12 '17 13:04 rmtmckenzie

The animal sniffer tool can do this.

On Wed, Apr 12, 2017, 9:17 AM Morgan [email protected] wrote:

It would be extraordinarily useful if retrolambda spit out a warning if java.util.function.* functions or other known backwords-incompatible code is found.

This could be configurable to either not show warnings or throw errors instead, but if it warned by default I think it would stop a lot of people from running into the problem by accident and simply having the application crash at runtime, as I would imaging that pretty much every platform that you'd use retrolambda for wouldn't have java.util.function.*. Most of the time the errors that occur are pretty indecipherable unless you already know that this is a problem.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/orfjackal/retrolambda/issues/128, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEZYnoTzCy7BkhNQ4R8ljYdkxTGMeks5rvM7hgaJpZM4M7aPy .

JakeWharton avatar Apr 12 '17 13:04 JakeWharton

This is not about java.util.function.* . An error should be shown for any used java 8 api.

adipascu avatar Apr 13 '17 09:04 adipascu

There are lots of new APIs added in Java 8. Warning about lambdas which implement one of the java.util.function interfaces would hopefully cover the most common use cases. The warning message could also mention animal sniffer.

luontola avatar Apr 13 '17 10:04 luontola