retrolambda
retrolambda copied to clipboard
Should show warning if java.util.function.* is used
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.
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 .
This is not about java.util.function.* . An error should be shown for any used java 8 api.
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.