Hi everyone,
I would like to work on a few JIRAs and at the same refactor some existing code to utilize Lambdas and Streams utilizing Java 8 features. Is it acceptable to develop with JDK 8 features into trunk? Taher Alkhateeb |
Administrator
|
Hi Taher,
Yes I think so. For now well known (I hope ;)) security reasons, if people want to use Oracle JDK they need to use Java 8. So implementing with new Java 8 features now in trunk sounds good to me. BTW this is only my opinion... Note that our demos are still using OpenJDK 1.7 I'm not quite sure of the policy http://www.cvedetails.com/vulnerability-list/vendor_id-93/product_id-23642/version_id-138218/Oracle-Openjdk-1.7.0.html Jacques Le 03/05/2015 10:52, Taher Alkhateeb a écrit : > Hi everyone, > > I would like to work on a few JIRAs and at the same refactor some existing > code to utilize Lambdas and Streams utilizing Java 8 features. > > > Is it acceptable to develop with JDK 8 features into trunk? > > Taher Alkhateeb > |
I'm favorable to use java 8.
I think it's will be pretty fin if you can support oracle jdk8 and openjdk8 also. I propose to organize a vote to validate or not this proposition Nicolas Le 03/05/2015 11:52, Jacques Le Roux a écrit : > Hi Taher, > > Yes I think so. For now well known (I hope ;)) security reasons, if > people want to use Oracle JDK they need to use Java 8. > So implementing with new Java 8 features now in trunk sounds good to > me. BTW this is only my opinion... > > Note that our demos are still using OpenJDK 1.7 I'm not quite sure of > the policy > http://www.cvedetails.com/vulnerability-list/vendor_id-93/product_id-23642/version_id-138218/Oracle-Openjdk-1.7.0.html > > > > Jacques > > > Le 03/05/2015 10:52, Taher Alkhateeb a écrit : >> Hi everyone, >> >> I would like to work on a few JIRAs and at the same refactor some >> existing >> code to utilize Lambdas and Streams utilizing Java 8 features. >> >> >> Is it acceptable to develop with JDK 8 features into trunk? >> >> Taher Alkhateeb >> |
I'm not sure if a vote is necessary, particularly if no one has any
objections. Regards Scott On 7 May 2015 07:44, "Nicolas Malin" <[hidden email]> wrote: > I'm favorable to use java 8. > I think it's will be pretty fin if you can support oracle jdk8 and > openjdk8 also. > > I propose to organize a vote to validate or not this proposition > > Nicolas > > Le 03/05/2015 11:52, Jacques Le Roux a écrit : > >> Hi Taher, >> >> Yes I think so. For now well known (I hope ;)) security reasons, if >> people want to use Oracle JDK they need to use Java 8. >> So implementing with new Java 8 features now in trunk sounds good to me. >> BTW this is only my opinion... >> >> Note that our demos are still using OpenJDK 1.7 I'm not quite sure of the >> policy >> http://www.cvedetails.com/vulnerability-list/vendor_id-93/product_id-23642/version_id-138218/Oracle-Openjdk-1.7.0.html >> >> >> >> Jacques >> >> >> Le 03/05/2015 10:52, Taher Alkhateeb a écrit : >> >>> Hi everyone, >>> >>> I would like to work on a few JIRAs and at the same refactor some >>> existing >>> code to utilize Lambdas and Streams utilizing Java 8 features. >>> >>> >>> Is it acceptable to develop with JDK 8 features into trunk? >>> >>> Taher Alkhateeb >>> >>> |
Administrator
|
Yes (lazy) consensus over vote ;)
Jacques Le 07/05/2015 05:02, Scott Gray a écrit : > I'm not sure if a vote is necessary, particularly if no one has any > objections. > > Regards > Scott > On 7 May 2015 07:44, "Nicolas Malin" <[hidden email]> wrote: > >> I'm favorable to use java 8. >> I think it's will be pretty fin if you can support oracle jdk8 and >> openjdk8 also. >> >> I propose to organize a vote to validate or not this proposition >> >> Nicolas >> >> Le 03/05/2015 11:52, Jacques Le Roux a écrit : >> >>> Hi Taher, >>> >>> Yes I think so. For now well known (I hope ;)) security reasons, if >>> people want to use Oracle JDK they need to use Java 8. >>> So implementing with new Java 8 features now in trunk sounds good to me. >>> BTW this is only my opinion... >>> >>> Note that our demos are still using OpenJDK 1.7 I'm not quite sure of the >>> policy >>> http://www.cvedetails.com/vulnerability-list/vendor_id-93/product_id-23642/version_id-138218/Oracle-Openjdk-1.7.0.html >>> >>> >>> >>> Jacques >>> >>> >>> Le 03/05/2015 10:52, Taher Alkhateeb a écrit : >>> >>>> Hi everyone, >>>> >>>> I would like to work on a few JIRAs and at the same refactor some >>>> existing >>>> code to utilize Lambdas and Streams utilizing Java 8 features. >>>> >>>> >>>> Is it acceptable to develop with JDK 8 features into trunk? >>>> >>>> Taher Alkhateeb >>>> >>>> |
Ok Thanks Scott and Jacques.
So Who is against use java 8 and more on trunk ? :) Nicolas Le 07/05/2015 08:46, Jacques Le Roux a écrit : > Yes (lazy) consensus over vote ;) > > Jacques > > Le 07/05/2015 05:02, Scott Gray a écrit : >> I'm not sure if a vote is necessary, particularly if no one has any >> objections. >> >> Regards >> Scott >> On 7 May 2015 07:44, "Nicolas Malin" <[hidden email]> wrote: >> >>> I'm favorable to use java 8. >>> I think it's will be pretty fin if you can support oracle jdk8 and >>> openjdk8 also. >>> >>> I propose to organize a vote to validate or not this proposition >>> >>> Nicolas >>> >>> Le 03/05/2015 11:52, Jacques Le Roux a écrit : >>> >>>> Hi Taher, >>>> >>>> Yes I think so. For now well known (I hope ;)) security reasons, if >>>> people want to use Oracle JDK they need to use Java 8. >>>> So implementing with new Java 8 features now in trunk sounds good >>>> to me. >>>> BTW this is only my opinion... >>>> >>>> Note that our demos are still using OpenJDK 1.7 I'm not quite sure >>>> of the >>>> policy >>>> http://www.cvedetails.com/vulnerability-list/vendor_id-93/product_id-23642/version_id-138218/Oracle-Openjdk-1.7.0.html >>>> >>>> >>>> >>>> >>>> Jacques >>>> >>>> >>>> Le 03/05/2015 10:52, Taher Alkhateeb a écrit : >>>> >>>>> Hi everyone, >>>>> >>>>> I would like to work on a few JIRAs and at the same refactor some >>>>> existing >>>>> code to utilize Lambdas and Streams utilizing Java 8 features. >>>>> >>>>> >>>>> Is it acceptable to develop with JDK 8 features into trunk? >>>>> >>>>> Taher Alkhateeb >>>>> >>>>> |
I don't think that it is a question of using or not using J8. It is more
about when to move it into trunk, as from that moment on there will be backward compatibility issues. A helpful solution in this respect could be to designate a specific release branch now (e.g. r15 or r16), create the version in JIRA and setup the dev branch in svn. Doing it that way J8 related issues can get registered, changes can get implemented and assessed (in the dev branch) without breaking current stuff in trunk. But it also ensures that we can create awareness prior to releasing stuff. Best regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com On Thu, May 7, 2015 at 9:30 AM, Nicolas Malin <[hidden email]> wrote: > Ok Thanks Scott and Jacques. > > So Who is against use java 8 and more on trunk ? > > :) > > Nicolas > > > Le 07/05/2015 08:46, Jacques Le Roux a écrit : > >> Yes (lazy) consensus over vote ;) >> >> Jacques >> >> Le 07/05/2015 05:02, Scott Gray a écrit : >> >>> I'm not sure if a vote is necessary, particularly if no one has any >>> objections. >>> >>> Regards >>> Scott >>> On 7 May 2015 07:44, "Nicolas Malin" <[hidden email]> wrote: >>> >>> I'm favorable to use java 8. >>>> I think it's will be pretty fin if you can support oracle jdk8 and >>>> openjdk8 also. >>>> >>>> I propose to organize a vote to validate or not this proposition >>>> >>>> Nicolas >>>> >>>> Le 03/05/2015 11:52, Jacques Le Roux a écrit : >>>> >>>> Hi Taher, >>>>> >>>>> Yes I think so. For now well known (I hope ;)) security reasons, if >>>>> people want to use Oracle JDK they need to use Java 8. >>>>> So implementing with new Java 8 features now in trunk sounds good to >>>>> me. >>>>> BTW this is only my opinion... >>>>> >>>>> Note that our demos are still using OpenJDK 1.7 I'm not quite sure of >>>>> the >>>>> policy >>>>> >>>>> http://www.cvedetails.com/vulnerability-list/vendor_id-93/product_id-23642/version_id-138218/Oracle-Openjdk-1.7.0.html >>>>> >>>>> >>>>> >>>>> Jacques >>>>> >>>>> >>>>> Le 03/05/2015 10:52, Taher Alkhateeb a écrit : >>>>> >>>>> Hi everyone, >>>>>> >>>>>> I would like to work on a few JIRAs and at the same refactor some >>>>>> existing >>>>>> code to utilize Lambdas and Streams utilizing Java 8 features. >>>>>> >>>>>> >>>>>> Is it acceptable to develop with JDK 8 features into trunk? >>>>>> >>>>>> Taher Alkhateeb >>>>>> >>>>>> >>>>>> > |
On May 7, 2015, at 9:52 AM, Pierre Smits <[hidden email]> wrote:
> I don't think that it is a question of using or not using J8. It is more > about when to move it into trunk, as from that moment on there will be > backward compatibility issues. I think we could do it also in the 14.12 release branch because no releases have been issued from it. And in this way it will be easier to backport future fixes from trunk to 14.12 (an important factor because 14.12 will be maintained for years, unless we change our release strategy). Jacopo |
Wouldn't we need a separate CI instance on J8 to ensure that tests don't
fail? Best regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com On Thu, May 7, 2015 at 9:58 AM, Jacopo Cappellato < [hidden email]> wrote: > On May 7, 2015, at 9:52 AM, Pierre Smits <[hidden email]> wrote: > > > I don't think that it is a question of using or not using J8. It is more > > about when to move it into trunk, as from that moment on there will be > > backward compatibility issues. > > I think we could do it also in the 14.12 release branch because no > releases have been issued from it. And in this way it will be easier to > backport future fixes from trunk to 14.12 (an important factor because > 14.12 will be maintained for years, unless we change our release strategy). > > Jacopo > > |
Administrator
|
In reply to this post by Jacopo Cappellato-5
I tend to agree
Jacques Le 07/05/2015 09:58, Jacopo Cappellato a écrit : > On May 7, 2015, at 9:52 AM, Pierre Smits <[hidden email]> wrote: > >> I don't think that it is a question of using or not using J8. It is more >> about when to move it into trunk, as from that moment on there will be >> backward compatibility issues. > I think we could do it also in the 14.12 release branch because no releases have been issued from it. And in this way it will be easier to backport future fixes from trunk to 14.12 (an important factor because 14.12 will be maintained for years, unless we change our release strategy). > > Jacopo > > > |
In reply to this post by Jacopo Cappellato-5
+1
I think it would be strange to do a 1st release of 14.12 without moving from (then non-supported) Java 1.7 to 1.8. Michael ecomify GmbH www.ecomify.de Am 07.05.15 um 09:58 schrieb Jacopo Cappellato: > On May 7, 2015, at 9:52 AM, Pierre Smits <[hidden email]> wrote: > >> I don't think that it is a question of using or not using J8. It is more >> about when to move it into trunk, as from that moment on there will be >> backward compatibility issues. > I think we could do it also in the 14.12 release branch because no releases have been issued from it. And in this way it will be easier to backport future fixes from trunk to 14.12 (an important factor because 14.12 will be maintained for years, unless we change our release strategy). > > Jacopo > |
Administrator
|
In reply to this post by Pierre Smits
Not a separate instance, just a change in the Python BuildBot script; nothing complicated
Jacques Le 07/05/2015 10:12, Pierre Smits a écrit : > Wouldn't we need a separate CI instance on J8 to ensure that tests don't > fail? > > Best regards, > > Pierre Smits > > *ORRTIZ.COM <http://www.orrtiz.com>* > Services & Solutions for Cloud- > Based Manufacturing, Professional > Services and Retail & Trade > http://www.orrtiz.com > > On Thu, May 7, 2015 at 9:58 AM, Jacopo Cappellato < > [hidden email]> wrote: > >> On May 7, 2015, at 9:52 AM, Pierre Smits <[hidden email]> wrote: >> >>> I don't think that it is a question of using or not using J8. It is more >>> about when to move it into trunk, as from that moment on there will be >>> backward compatibility issues. >> I think we could do it also in the 14.12 release branch because no >> releases have been issued from it. And in this way it will be easier to >> backport future fixes from trunk to 14.12 (an important factor because >> 14.12 will be maintained for years, unless we change our release strategy). >> >> Jacopo >> >> |
In reply to this post by Jacques Le Roux
Not a reply to Jacques, but if an absolutely java-8-only feature is
used, be sure to update the regex in ${ofbiz.home}/macros.xml, then the source/target values in common.xml in the same folder. ps: I'm fine with moving towards 1.8. It's not a choice that we can make, actually. On 05/07/2015 01:46 AM, Jacques Le Roux wrote: > Yes (lazy) consensus over vote ;) > > Jacques > |
In reply to this post by Michael Brohl-3
+1
Java 8 works well, is supported and opens a lot of doors for new ways to write clearer code. Ron On 07/05/2015 4:58 AM, Michael Brohl wrote: > +1 > > I think it would be strange to do a 1st release of 14.12 without > moving from (then non-supported) Java 1.7 to 1.8. > > Michael > ecomify GmbH > www.ecomify.de > > Am 07.05.15 um 09:58 schrieb Jacopo Cappellato: >> On May 7, 2015, at 9:52 AM, Pierre Smits <[hidden email]> wrote: >> >>> I don't think that it is a question of using or not using J8. It is >>> more >>> about when to move it into trunk, as from that moment on there will be >>> backward compatibility issues. >> I think we could do it also in the 14.12 release branch because no >> releases have been issued from it. And in this way it will be easier >> to backport future fixes from trunk to 14.12 (an important factor >> because 14.12 will be maintained for years, unless we change our >> release strategy). >> >> Jacopo >> > > -- Ron Wheeler President Artifact Software Inc email: [hidden email] skype: ronaldmwheeler phone: 866-970-2435, ext 102 |
In reply to this post by Adam Heath-2
Yes, we must support Java 8, but we absolutely have the choice to still
support Java 7 (i.e. no use of Java 8 only features yet) IMHO there should be good reasons to use these Java 8 features (not just because it's cool..) It's not a big deal to update a developer machine to Java 8 (well, my laptop still runs Kubuntu 12.04 ..) but it's another thing in (big) companies (old operating systems, get approvals from security office etc...) Christian Am 07.05.2015 15:40, schrieb Adam Heath: > Not a reply to Jacques, but if an absolutely java-8-only feature is > used, be sure to update the regex in ${ofbiz.home}/macros.xml, then > the source/target values in common.xml in the same folder. > > ps: I'm fine with moving towards 1.8. It's not a choice that we can > make, actually. > > On 05/07/2015 01:46 AM, Jacques Le Roux wrote: >> Yes (lazy) consensus over vote ;) >> >> Jacques >> > > |
On 07/05/2015 11:32 AM, Christian Geisert wrote:
> Yes, we must support Java 8, but we absolutely have the choice to still > support Java 7 (i.e. no use of Java 8 only features yet) > > IMHO there should be good reasons to use these Java 8 features (not just > because it's cool..) > > It's not a big deal to update a developer machine to Java 8 (well, my > laptop still runs Kubuntu 12.04 ..) but it's another thing in (big) > companies (old operating systems, get approvals from security office etc...) Security officer is going to be insisting on an upgrade to Java 8 since Java 7 is no longer going to get security fixes. Have we heard of any OS that supports Java 7 but not Java 8? Ron > > Christian > > Am 07.05.2015 15:40, schrieb Adam Heath: >> Not a reply to Jacques, but if an absolutely java-8-only feature is >> used, be sure to update the regex in ${ofbiz.home}/macros.xml, then >> the source/target values in common.xml in the same folder. >> >> ps: I'm fine with moving towards 1.8. It's not a choice that we can >> make, actually. >> >> On 05/07/2015 01:46 AM, Jacques Le Roux wrote: >>> Yes (lazy) consensus over vote ;) >>> >>> Jacques >>> >> > -- Ron Wheeler President Artifact Software Inc email: [hidden email] skype: ronaldmwheeler phone: 866-970-2435, ext 102 |
Well call it "Standards Office" or whatever, the guys who decide which
platforms are allowed to use in the company. Java 8 is available since just about a year.. Just the mentioned Ubuntu 12.04 LTS (= Longtime Support, which means support for 5 years) has no Java 8 in the official repositories. Is there a Java 8 for AS/400 ;-) Anyway, my point is that there should be good reasons to switch to Java 8 only. Christian Am 07.05.2015 17:58, schrieb Ron Wheeler: > On 07/05/2015 11:32 AM, Christian Geisert wrote: >> Yes, we must support Java 8, but we absolutely have the choice to still >> support Java 7 (i.e. no use of Java 8 only features yet) >> >> IMHO there should be good reasons to use these Java 8 features (not just >> because it's cool..) >> >> It's not a big deal to update a developer machine to Java 8 (well, my >> laptop still runs Kubuntu 12.04 ..) but it's another thing in (big) >> companies (old operating systems, get approvals from security office >> etc...) > > Security officer is going to be insisting on an upgrade to Java 8 > since Java 7 is no longer going to get security fixes. > > Have we heard of any OS that supports Java 7 but not Java 8? > > Ron > >> >> Christian >> >> Am 07.05.2015 15:40, schrieb Adam Heath: >>> Not a reply to Jacques, but if an absolutely java-8-only feature is >>> used, be sure to update the regex in ${ofbiz.home}/macros.xml, then >>> the source/target values in common.xml in the same folder. >>> >>> ps: I'm fine with moving towards 1.8. It's not a choice that we can >>> make, actually. >>> >>> On 05/07/2015 01:46 AM, Jacques Le Roux wrote: >>>> Yes (lazy) consensus over vote ;) >>>> >>>> Jacques >>>> >>> >> > > |
On 07/05/2015 12:37 PM, Christian Geisert wrote:
> Well call it "Standards Office" or whatever, the guys who decide which > platforms are allowed to use in the company. Java 7 will be coming off the list in most companies if it has not already been done. > > Java 8 is available since just about a year.. > Just the mentioned Ubuntu 12.04 LTS (= Longtime Support, which means > support for 5 years) has no Java 8 in the official repositories. > Is there a Java 8 for AS/400 ;-) http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/ > Anyway, my point is that there should be good reasons to switch to Java > 8 only. > > Christian > > Am 07.05.2015 17:58, schrieb Ron Wheeler: >> On 07/05/2015 11:32 AM, Christian Geisert wrote: >>> Yes, we must support Java 8, but we absolutely have the choice to still >>> support Java 7 (i.e. no use of Java 8 only features yet) >>> >>> IMHO there should be good reasons to use these Java 8 features (not just >>> because it's cool..) >>> >>> It's not a big deal to update a developer machine to Java 8 (well, my >>> laptop still runs Kubuntu 12.04 ..) but it's another thing in (big) >>> companies (old operating systems, get approvals from security office >>> etc...) >> Security officer is going to be insisting on an upgrade to Java 8 >> since Java 7 is no longer going to get security fixes. >> >> Have we heard of any OS that supports Java 7 but not Java 8? >> >> Ron >> >>> Christian >>> >>> Am 07.05.2015 15:40, schrieb Adam Heath: >>>> Not a reply to Jacques, but if an absolutely java-8-only feature is >>>> used, be sure to update the regex in ${ofbiz.home}/macros.xml, then >>>> the source/target values in common.xml in the same folder. >>>> >>>> ps: I'm fine with moving towards 1.8. It's not a choice that we can >>>> make, actually. >>>> >>>> On 05/07/2015 01:46 AM, Jacques Le Roux wrote: >>>>> Yes (lazy) consensus over vote ;) >>>>> >>>>> Jacques >>>>> >> > -- Ron Wheeler President Artifact Software Inc email: [hidden email] skype: ronaldmwheeler phone: 866-970-2435, ext 102 |
Hello everyone,
Okay, so it seems there is consensus on going ahead with Java 8. I tried testing this patch which I believe upgrades OFBiz to JDK 8. Running "./ant clean-all build load-demo run-tests" delivers a failure in "testConvertOperatorSubstitutions" (base tests). The error message is shown below . So the line giving the error is exactly this one in org.ofbiz.base.util.test.StringUtilTests assertEquals("all converions", "one && two || three > four >= five < six <= seven", StringUtil.convertOperatorSubstitutions("one @and two @or three @gt four @gteq five @lt six @lteq seven")); This is weird. I checked JDK 7 and JDK 8 implementations and I think they are identical in the matcher API. Yet when switching to JDK 8 the matcher evaluates on "@gt" of the "@qteq " pattern and so you end up with ">eq" instead of ">= " . This is without even applying the above patch. I hope I am not running on a wild goose chase and ignoring something simple or silly? Any Ideas? ==== error log start ==== all converions expected:<...wo || three > four >[=] five < six <= seven> but was:<...wo || three > four >[eq] five < six <= seven> junit.framework.ComparisonFailure: all converions expected:<...wo || three > four >[=] five < six <= seven> but was:<...wo || three > four >[eq] five < six <= seven> at org.ofbiz.base.test.GenericTestCaseBase.assertEquals(GenericTestCaseBase.java:313) at org.ofbiz.base.util.test.StringUtilTests.testConvertOperatorSubstitutions(StringUtilTests.java:269) at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:146) at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) at org.ofbiz.base.start.Start.startStartLoaders(Start.java:408) at org.ofbiz.base.start.Start.start(Start.java:434) at org.ofbiz.base.start.Start.main(Start.java:135) ==== error log end ==== Taher Alkhateeb ----- Original Message ----- From: "Ron Wheeler" <[hidden email]> To: [hidden email] Sent: Thursday, 7 May, 2015 8:12:20 PM Subject: Re: Java 8 and functional programming in trunk On 07/05/2015 12:37 PM, Christian Geisert wrote: > Well call it "Standards Office" or whatever, the guys who decide which > platforms are allowed to use in the company. Java 7 will be coming off the list in most companies if it has not already been done. > > Java 8 is available since just about a year.. > Just the mentioned Ubuntu 12.04 LTS (= Longtime Support, which means > support for 5 years) has no Java 8 in the official repositories. > Is there a Java 8 for AS/400 ;-) http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/ > Anyway, my point is that there should be good reasons to switch to Java > 8 only. > > Christian > > Am 07.05.2015 17:58, schrieb Ron Wheeler: >> On 07/05/2015 11:32 AM, Christian Geisert wrote: >>> Yes, we must support Java 8, but we absolutely have the choice to still >>> support Java 7 (i.e. no use of Java 8 only features yet) >>> >>> IMHO there should be good reasons to use these Java 8 features (not just >>> because it's cool..) >>> >>> It's not a big deal to update a developer machine to Java 8 (well, my >>> laptop still runs Kubuntu 12.04 ..) but it's another thing in (big) >>> companies (old operating systems, get approvals from security office >>> etc...) >> Security officer is going to be insisting on an upgrade to Java 8 >> since Java 7 is no longer going to get security fixes. >> >> Have we heard of any OS that supports Java 7 but not Java 8? >> >> Ron >> >>> Christian >>> >>> Am 07.05.2015 15:40, schrieb Adam Heath: >>>> Not a reply to Jacques, but if an absolutely java-8-only feature is >>>> used, be sure to update the regex in ${ofbiz.home}/macros.xml, then >>>> the source/target values in common.xml in the same folder. >>>> >>>> ps: I'm fine with moving towards 1.8. It's not a choice that we can >>>> make, actually. >>>> >>>> On 05/07/2015 01:46 AM, Jacques Le Roux wrote: >>>>> Yes (lazy) consensus over vote ;) >>>>> >>>>> Jacques >>>>> >> > -- Ron Wheeler President Artifact Software Inc email: [hidden email] skype: ronaldmwheeler phone: 866-970-2435, ext 102 |
Hi All,
What is the proper process to move to JDK 8? I have a patch ready to move to JDK 8 and fix an issue which we describe below. Should we create a JIRA or request a vote or what exactly? While debugging I discovered a bug that was failing the tests when moving from JDK 7 to JDK 8 which has to do with the implementation of a HashMap. Essentially the HashMap in JDK 8 does not care for the insertion order while it does in JDK 7 (see below). A simple fix is to replace HashMap with LinkedHashMap. Now all the tests run in JDK 8. Taher Alkhateeb ==== debug outcome ==== substitutionPatternMap.entrySet() under JDK 7 in the test testConvertOperatorSubstitutions (last assert test) {&&=@and, <==@lteq, ||=@or, >==@gteq, >=@gt, <=@lt} substitutionPatternMap.entrySet() under JDK 8 in the test testConvertOperatorSubstitutions (last assert test) {&&=@and, ||=@or, <==@lteq, <=@lt, >=@gt, >==@gteq} ----- Original Message ----- From: "Taher Alkhateeb" <[hidden email]> To: [hidden email] Sent: Monday, 25 May, 2015 8:08:25 AM Subject: Re: Java 8 and functional programming in trunk Hello everyone, Okay, so it seems there is consensus on going ahead with Java 8. I tried testing this patch which I believe upgrades OFBiz to JDK 8. Running "./ant clean-all build load-demo run-tests" delivers a failure in "testConvertOperatorSubstitutions" (base tests). The error message is shown below . So the line giving the error is exactly this one in org.ofbiz.base.util.test.StringUtilTests assertEquals("all converions", "one && two || three > four >= five < six <= seven", StringUtil.convertOperatorSubstitutions("one @and two @or three @gt four @gteq five @lt six @lteq seven")); This is weird. I checked JDK 7 and JDK 8 implementations and I think they are identical in the matcher API. Yet when switching to JDK 8 the matcher evaluates on "@gt" of the "@qteq " pattern and so you end up with ">eq" instead of ">=" . This is without even applying the above patch. I hope I am not running on a wild goose chase and ignoring something simple or silly? Any Ideas? ==== error log start ==== all converions expected:<...wo || three > four >[=] five < six <= seven> but was:<...wo || three > four >[eq] five < six <= seven> junit.framework.ComparisonFailure: all converions expected:<...wo || three > four >[=] five < six <= seven> but was:<...wo || three > four >[eq] five < six <= seven> at org.ofbiz.base.test.GenericTestCaseBase.assertEquals(GenericTestCaseBase.java:313) at org.ofbiz.base.util.test.StringUtilTests.testConvertOperatorSubstitutions(StringUtilTests.java:269) at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:146) at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) at org.ofbiz.base.start.Start.startStartLoaders(Start.java:408) at org.ofbiz.base.start.Start.start(Start.java:434) at org.ofbiz.base.start.Start.main(Start.java:135) ==== error log end ==== Taher Alkhateeb ----- Original Message ----- From: "Ron Wheeler" <[hidden email]> To: [hidden email] Sent: Thursday, 7 May, 2015 8:12:20 PM Subject: Re: Java 8 and functional programming in trunk On 07/05/2015 12:37 PM, Christian Geisert wrote: > Well call it "Standards Office" or whatever, the guys who decide which > platforms are allowed to use in the company. Java 7 will be coming off the list in most companies if it has not already been done. > > Java 8 is available since just about a year.. > Just the mentioned Ubuntu 12.04 LTS (= Longtime Support, which means > support for 5 years) has no Java 8 in the official repositories. > Is there a Java 8 for AS/400 ;-) http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/ > Anyway, my point is that there should be good reasons to switch to Java > 8 only. > > Christian > > Am 07.05.2015 17:58, schrieb Ron Wheeler: >> On 07/05/2015 11:32 AM, Christian Geisert wrote: >>> Yes, we must support Java 8, but we absolutely have the choice to still >>> support Java 7 (i.e. no use of Java 8 only features yet) >>> >>> IMHO there should be good reasons to use these Java 8 features (not just >>> because it's cool..) >>> >>> It's not a big deal to update a developer machine to Java 8 (well, my >>> laptop still runs Kubuntu 12.04 ..) but it's another thing in (big) >>> companies (old operating systems, get approvals from security office >>> etc...) >> Security officer is going to be insisting on an upgrade to Java 8 >> since Java 7 is no longer going to get security fixes. >> >> Have we heard of any OS that supports Java 7 but not Java 8? >> >> Ron >> >>> Christian >>> >>> Am 07.05.2015 15:40, schrieb Adam Heath: >>>> Not a reply to Jacques, but if an absolutely java-8-only feature is >>>> used, be sure to update the regex in ${ofbiz.home}/macros.xml, then >>>> the source/target values in common.xml in the same folder. >>>> >>>> ps: I'm fine with moving towards 1.8. It's not a choice that we can >>>> make, actually. >>>> >>>> On 05/07/2015 01:46 AM, Jacques Le Roux wrote: >>>>> Yes (lazy) consensus over vote ;) >>>>> >>>>> Jacques >>>>> >> > -- Ron Wheeler President Artifact Software Inc email: [hidden email] skype: ronaldmwheeler phone: 866-970-2435, ext 102 |
Free forum by Nabble | Edit this page |