<div dir="ltr"><div>Hi,</div><div><br></div>> Also it means that we have to use JDK7 IDE profiles with the source, which increase the odds of using JDK types/methods/fields/values that do not exist in JDK6.<br><div class="">
</div><div class="gmail_extra"><br></div><div class="gmail_extra">You could use Animal Sniffer [1] to make sure no Java 7 APIs are referenced.</div><div class="gmail_extra"><br></div><div class="gmail_extra">We're doing the same in several Hibernate projects which need to use Java 7 for compilation but have Java 6 as target runtime. Animal Sniffer provides a Maven plug-in, Ant task etc. which fail the build if APIs are used which don't exist in a configured target baseline.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">--Gunnar</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1] <a href="http://mojo.codehaus.org/animal-sniffer/">http://mojo.codehaus.org/animal-sniffer/</a></div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/31 Jason Greene <span dir="ltr"><<a href="mailto:jason.greene@redhat.com" target="_blank">jason.greene@redhat.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">If EAP diverges due to a patch, and then later we merge upstream after someone updates the entire file to use diamonds, then we get huge deltas referring to a ton of differences that have no practical value, and potentially conflicts.<br>
<br>
Also it means that we have to use JDK7 IDE profiles with the source, which increase the odds of using JDK types/methods/fields/values that do not exist in JDK6.<br>
<div class=""><div class="h5"><br>
<br>
On Aug 30, 2013, at 5:18 PM, David M. Lloyd <<a href="mailto:david.lloyd@redhat.com">david.lloyd@redhat.com</a>> wrote:<br>
<br>
> (Forgot to send to list!)<br>
><br>
> This lets us compile EAP with JDK 7 syntax though, that's the point. We<br>
> can backport 1.7 syntax patches.<br>
><br>
> On 08/30/2013 05:01 PM, Jason Greene wrote:<br>
>> The biggest problem with the diamond operators isn't bytecode, its back porting into EAP.<br>
>><br>
>> On Aug 30, 2013, at 4:46 PM, David M. Lloyd <<a href="mailto:david.lloyd@redhat.com">david.lloyd@redhat.com</a>> wrote:<br>
>><br>
>>> At this point in time, I'd say just about everyone wants to move ahead<br>
>>> with Java 7 syntax because let's face it: there's a lot of nice stuff in<br>
>>> there. But until now, doing so meant that projects which rely on<br>
>>> running on JDK 6 until the heat-death of the universe are on a fast road<br>
>>> to pain and suffering.<br>
>>><br>
>>> Well, all that ends today... introducing "seven2six" [1], a tiny tool<br>
>>> (only two source files) which losslessly converts version 51.0 (1.7)<br>
>>> class files to version 50.0 (1.6).<br>
>>><br>
>>> With this tool in your build, you can switch your language level to 1.7<br>
>>> without alienating your 1.6 users. I've already got this integrated<br>
>>> with JBoss Modules (it's quite simple to do as the README describes).<br>
>>><br>
>>> This could end Brian's major pet peeve of rooting out diamond operator<br>
>>> usage in new WildFly files, among other issues. I want to know what you<br>
>>> guys think of bringing this in to WildFly (maybe even in to<br>
>>> jboss-parent, honestly). The initial version is released to Maven<br>
>>> already at org.jboss.seven2six:seven2six:1.0.Final so feel free to mess<br>
>>> with it and suggest improvements (just use the GH bug tracker for now I<br>
>>> guess).<br>
>>><br>
>>> Thanks to Kabir Khan for the original idea and implementation/POC (I<br>
>>> just polished it up with ASM), and James Perkins for the Maven<br>
>>> integration code.<br>
>>><br>
>>> [1] <a href="https://github.com/dmlloyd/seven2six" target="_blank">https://github.com/dmlloyd/seven2six</a><br>
>>> --<br>
>>> - DML<br>
>>> _______________________________________________<br>
>>> wildfly-dev mailing list<br>
>>> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
>>> <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
>><br>
>> --<br>
>> Jason T. Greene<br>
>> WildFly Lead / JBoss EAP Platform Architect<br>
>> JBoss, a division of Red Hat<br>
>><br>
><br>
><br>
> --<br>
> - DML<br>
> _______________________________________________<br>
> wildfly-dev mailing list<br>
> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
<br>
--<br>
Jason T. Greene<br>
WildFly Lead / JBoss EAP Platform Architect<br>
JBoss, a division of Red Hat<br>
<br>
<br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
</div></div></blockquote></div><br></div></div>