[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040442#comment-16040442
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user asfgit closed the pull request at:

https://github.com/apache/commons-lang/pull/269


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040401#comment-16040401
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user coveralls commented on the issue:

https://github.com/apache/commons-lang/pull/269
  

[![Coverage 
Status](https://coveralls.io/builds/11862777/badge)](https://coveralls.io/builds/11862777)

Coverage increased (+0.05%) to 95.221% when pulling 
**c68285bb3392665827595ac408a5fad828b0351f on kinow:LANG-1337** into 
**551101299da7f75ea5478db1a6bc194963e0ac34 on apache:master**.



> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040390#comment-16040390
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user kinow commented on the issue:

https://github.com/apache/commons-lang/pull/269
  
Comments added, received some feedback, but would still be useful someone 
with the last IBM JDK 8 to give it a try and confirm it works for him/her :)


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040368#comment-16040368
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user kinow commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/269#discussion_r120550160
  
--- Diff: 
src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java ---
@@ -316,7 +317,7 @@ public void testReflectionHierarchyArrayList() {
 // representation different for IBM JDK 1.6.0, LANG-727
 assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && 
"1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
 assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) 
&& "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
-final List list = new ArrayList<>();
+final List list = new 
ArrayList<>(arraylistInitialCapacity);
--- End diff --

Roger that. Will add a note to myself to fix the other final member 
variables later... trying to be concise, but I'm clearly missing the point here 
:-) was supposedly to be a very simple fix for this issue. Pushing a new commit 
in a few minutes, just finishing to review commons-fileupload vote.


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040362#comment-16040362
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user britter commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/269#discussion_r120549733
  
--- Diff: 
src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java ---
@@ -316,7 +317,7 @@ public void testReflectionHierarchyArrayList() {
 // representation different for IBM JDK 1.6.0, LANG-727
 assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && 
"1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
 assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) 
&& "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
-final List list = new ArrayList<>();
+final List list = new 
ArrayList<>(arraylistInitialCapacity);
--- End diff --

Sorry to be nitpicking, but this should be a constant and wie should add a 
comment referencing JIRA-1337 with an explanation why we need to pass the 
initial capacity.


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040328#comment-16040328
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user coveralls commented on the issue:

https://github.com/apache/commons-lang/pull/269
  

[![Coverage 
Status](https://coveralls.io/builds/11862419/badge)](https://coveralls.io/builds/11862419)

Coverage increased (+0.05%) to 95.221% when pulling 
**0344ca3f2d43e3732bf16370262303be8761a523 on kinow:LANG-1337** into 
**551101299da7f75ea5478db1a6bc194963e0ac34 on apache:master**.



> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040327#comment-16040327
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user coveralls commented on the issue:

https://github.com/apache/commons-lang/pull/269
  

[![Coverage 
Status](https://coveralls.io/builds/11862419/badge)](https://coveralls.io/builds/11862419)

Coverage increased (+0.05%) to 95.221% when pulling 
**0344ca3f2d43e3732bf16370262303be8761a523 on kinow:LANG-1337** into 
**551101299da7f75ea5478db1a6bc194963e0ac34 on apache:master**.



> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040318#comment-16040318
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user kinow commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/269#discussion_r120546260
  
--- Diff: 
src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java ---
@@ -316,7 +316,7 @@ public void testReflectionHierarchyArrayList() {
 // representation different for IBM JDK 1.6.0, LANG-727
 assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && 
"1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
 assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) 
&& "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
-final List list = new ArrayList<>();
+final List list = new ArrayList<>(10);
--- End diff --

>If the test fails when the initial size arg is omitted, does that not also 
affect the behaviour of the method being tested?

Not really. The test simply checks the string built for an arraylist 
through reflection. The issue was caused for believing that the lazy 
initialization (as @andyklimczak) would work in the same independent of the JVM.

What the test is verifying is correct, the current approach could be 
improved to make the test less flaky.


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040310#comment-16040310
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user kinow commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/269#discussion_r120545692
  
--- Diff: 
src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java ---
@@ -316,7 +316,7 @@ public void testReflectionHierarchyArrayList() {
 // representation different for IBM JDK 1.6.0, LANG-727
 assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && 
"1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
 assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) 
&& "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
-final List list = new ArrayList<>();
+final List list = new ArrayList<>(10);
--- End diff --

Fair enough on the magic number. I'd thought about that, then noticed a few 
other tests with numbers. But one broken window doesn't mean I can break 
another one :-) fixing in another commit.


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039062#comment-16039062
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user sebbASF commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/269#discussion_r120390348
  
--- Diff: 
src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java ---
@@ -316,7 +316,7 @@ public void testReflectionHierarchyArrayList() {
 // representation different for IBM JDK 1.6.0, LANG-727
 assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && 
"1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
 assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) 
&& "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
-final List list = new ArrayList<>();
+final List list = new ArrayList<>(10);
--- End diff --

Thanks!

If the test fails when the initial size arg is omitted, does that not also 
affect the behaviour of the method being tested? i.e. do apps also have to 
ensure that they specify the min size when using 
ToStringBuilder.reflectionToString() ?


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039038#comment-16039038
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user andyklimczak commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/269#discussion_r120386094
  
--- Diff: 
src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java ---
@@ -316,7 +316,7 @@ public void testReflectionHierarchyArrayList() {
 // representation different for IBM JDK 1.6.0, LANG-727
 assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && 
"1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
 assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) 
&& "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
-final List list = new ArrayList<>();
+final List list = new ArrayList<>(10);
--- End diff --

probably related to [this](https://stackoverflow.com/a/34250231)?


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> Apache 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039036#comment-16039036
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user andyklimczak commented on the issue:

https://github.com/apache/commons-lang/pull/269
  
probably related to [this](https://stackoverflow.com/a/34250231)?


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039027#comment-16039027
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user sebbASF commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/269#discussion_r120385458
  
--- Diff: 
src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java ---
@@ -316,7 +316,7 @@ public void testReflectionHierarchyArrayList() {
 // representation different for IBM JDK 1.6.0, LANG-727
 assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && 
"1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
 assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) 
&& "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
-final List list = new ArrayList<>();
+final List list = new ArrayList<>(10);
--- End diff --

I think that needs a comment.
Is the magic number 10 significant?
If so, what determines the value?
Could it ever change?


> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16038755#comment-16038755
 ] 

ASF GitHub Bot commented on LANG-1337:
--

Github user coveralls commented on the issue:

https://github.com/apache/commons-lang/pull/269
  

[![Coverage 
Status](https://coveralls.io/builds/11847788/badge)](https://coveralls.io/builds/11847788)

Coverage remained the same at 95.17% when pulling 
**65b08c4f91a4e5d78eb645b46d06d7a46f8c62dd on kinow:LANG-1337** into 
**551101299da7f75ea5478db1a6bc194963e0ac34 on apache:master**.



> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0_131"
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build 

[jira] [Commented] (LANG-1337) Fix test failures in IBM JDK 8 for ToStringBuilderTest

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16038689#comment-16038689
 ] 

ASF GitHub Bot commented on LANG-1337:
--

GitHub user kinow opened a pull request:

https://github.com/apache/commons-lang/pull/269

LANG-1337: Fix test failures in IBM JDK 8 for ToStringBuilderTest by 
specifying the ArrayList initial capacity.

See https://issues.apache.org/jira/browse/LANG-1337 for issue description 
and explanation of the changes here.

In summary, we specify the ArrayList's initial capacity, this way the 
String built through reflection has the expected value. Tested with Oracle JDK 
7 and 8, and IBM JDK 8.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/kinow/commons-lang LANG-1337

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/commons-lang/pull/269.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #269


commit 65b08c4f91a4e5d78eb645b46d06d7a46f8c62dd
Author: Bruno P. Kinoshita 
Date:   2017-06-06T11:41:31Z

LANG-1337: Fix test failures in IBM JDK 8 for ToStringBuilderTest by 
specifying the ArrayList initial capacity.




> Fix test failures in IBM JDK 8 for ToStringBuilderTest
> --
>
> Key: LANG-1337
> URL: https://issues.apache.org/jira/browse/LANG-1337
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.5
> Environment: java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxa6480sr4fp6-20170518_02(SR4 FP6))
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 
> 20170516_348050 (JIT enabled, AOT enabled)
> J9VM - R28_20170516_1905_B348050
> JIT  - tr.r14.java_20170516_348050
> GC   - R28_20170516_1905_B348050_CMPRSS
> J9CL - 20170516_348050)
> JCL - 20170516_01 based on Oracle jdk8u131-b11
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0, vendor: IBM Corporation
> Java home: /home/kinow/Development/java/ibm-java-x86_64-80/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> git sha 551101299da7f75ea5478db1a6bc194963e0ac34
>Reporter: Bruno P. Kinoshita
>Assignee: Bruno P. Kinoshita
>Priority: Minor
>  Labels: ibm, ibm-jdk, test
> Fix For: 3.6
>
>
> From the 3.6 thread RC2. We had issues in the release. Two tests failed. One 
> of these tests happened on IBM JDK 8, and was related to time zones. Gary 
> Gregory quickly pointed that the very latest IBM JDK 8 released did not had 
> this issue.
> Indeed, I grabbed a JDK 8 from IBM and had this issue, and then after looking 
> for the latest version, I had only one test failing. This test in question 
> was ToStringBuilderTest#testReflectionHierarchyArrayList.
> Debugging the test in Eclipse, with the JDK pointing to IBM JDK 8 (and taking 
> care to not let the Eclipse maven integration change it), there is a part of 
> the code that receives an ArrayList object to create a String with reflection.
> In Oracle JDK 7, the object contains the default 10 empty positions, and thus 
> the generated String is.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={,},size=0,modCount=0]
> {noformat}
> But with IBM JDK 8, the ArrayList is empty, nada, and then I get the 
> following in the Eclipse debugger.
> {noformat}
> java.util.ArrayList@761a4a3d[elementData={},size=0,modCount=0]
> {noformat}
> The test is - as commented in LANG-727 - a bit flaky. However, the expected 
> string assumes ArrayList will have an initial 10 null values. So the pull 
> request in this issue simply creates an ArrayList with 10 initial capacity 
> :-) a naïve approach, but that I believe fixes this test.
> The changes in the pull request linked to this issue have all tests passing 
> with the following set-ups:
> {noformat}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.7.0_80, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-7-oracle/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-78-generic", arch: "amd64", family: "unix"
> ---
> java version "1.7.0_80"
> Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
> 2015-11-11T05:41:47+13:00)
> Maven home: /opt/maven
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: