[wildfly-dev] Java 8 API Warning

Steve Ebersole steve at hibernate.org
Fri Apr 17 09:11:14 EDT 2015


I ran into issues with using Java 8 to run my build but targeting Java 7
for most artifacts.  I would highly suggest applying a solution based on
AnimalSniffer or supplying the Java 6/7 tools.jar for bootclasspath to
javac.  Helps catch these types of issues
On Apr 17, 2015 8:04 AM, "Darran Lofthouse" <darran.lofthouse at jboss.com>
wrote:

> Quick warning for anyone developing using Java 8 but on projects still
> dependent on Java 7.
>
> Normally this is fine, as an engineer you make sure you don't use any
> new language features or call new APIs and generally it all works.
>
> With Java 8 there is one addition gotcha, Java 8 adds support for
> default method implementations on interfaces, to add to this some
> pre-existing methods have now been replaced with default
> implementations.  The side effect being it is easy to miss that you have
> a method missing from a class and it will not be picked up till it is
> compiled on Java 7.
>
> e.g. On java.util.Iterator the remove method is now default so classes
> that implement this interface no longer need to implement that method
> unless they really are providing an implementation of that method.
>
> Regards,
> Darran Lofthouse.
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20150417/0c61361f/attachment.html 


More information about the wildfly-dev mailing list