groovy git commit: Refine the test for GROOVY-8228 further

2017-08-08 Thread sunlan
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X d10beb9e9 -> 9039c8592


Refine the test for GROOVY-8228 further

(cherry picked from commit 9949525)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/9039c859
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/9039c859
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/9039c859

Branch: refs/heads/GROOVY_2_6_X
Commit: 9039c8592f929b4972f6cb1cf1bad4d1d2af3a1a
Parents: d10beb9
Author: sunlan 
Authored: Wed Aug 9 12:44:42 2017 +0800
Committer: sunlan 
Committed: Wed Aug 9 12:45:10 2017 +0800

--
 .../src/test/resources/bugs/GROOVY-8228.groovy  | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/9039c859/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
--
diff --git 
a/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy 
b/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
index 19045ae..9944a75 100644
--- a/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
+++ b/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
@@ -77,16 +77,30 @@ assert ['JSR308Interface1', 
'JSR308Interface2 e.name == 
'test')
 assert [IOException, SQLException] == 
testMethod.getAnnotatedExceptionTypes().collect(e -> e.type)
 assert 'java.util.List' == 
testMethod.getAnnotatedReturnType().type.typeName
+
+// 1)
 assert ['java.util.List', 
'java.util.List'].contains(testMethod.getAnnotatedParameterTypes().collect(e -> 
e.type.typeName).get(0))
 
 Method test2Method = JSR308Class.class.getDeclaredMethods().find(e -> e.name 
== 'test2')
 assert JSR308Class.class == test2Method.getAnnotatedReceiverType().type
 
+
+// 2)
 Parameter listParameter = testMethod.getParameters()[0]
 assert ['java.util.List', 
'java.util.List'].contains(listParameter.getAnnotatedType().type.typeName)
 
 Field nameField = JSR308Class.class.getDeclaredField('name');
 assert String.class == nameField.getAnnotatedType().type
 
+
+// 3)
 TypeVariable tv = JSR308Interface2.class.getTypeParameters()[0]
-assert [CharSequence.class] == tv.getAnnotatedBounds().collect(e -> e.type)
+assert [CharSequence.class, null].contains(tv.getAnnotatedBounds().collect(e 
-> e.type).get(0))
+
+// the above 3 tests get different result when running in the different 
CI(travis-ci and teamcity)
+// travis-ci succeeds:  https://travis-ci.org/apache/groovy/builds/262506189
+// teamcity fails:  
http://ci.groovy-lang.org/viewLog.html?buildId=41265&tab=buildResultsDiv&buildTypeId=Groovy_Jdk8Build_PlusSnapshotDeploy
+//  
http://ci.groovy-lang.org/viewLog.html?buildId=41260&tab=buildResultsDiv&buildTypeId=Groovy_Jdk8Build_PlusSnapshotDeploy
+//  
http://ci.groovy-lang.org/viewLog.html?buildId=41257&tab=buildResultsDiv&buildTypeId=Groovy_Jdk8Build_PlusSnapshotDeploy
+//
+// I guess the difference is related to the version of JDK8 deployed(Maybe it 
is a bug of Java8)



groovy git commit: Refine the test for GROOVY-8228 further

2017-08-08 Thread sunlan
Repository: groovy
Updated Branches:
  refs/heads/master abd63ab77 -> 9949525cd


Refine the test for GROOVY-8228 further


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/9949525c
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/9949525c
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/9949525c

Branch: refs/heads/master
Commit: 9949525cdae6619d39c1becd6b4c4470e41e945f
Parents: abd63ab
Author: sunlan 
Authored: Wed Aug 9 12:44:42 2017 +0800
Committer: sunlan 
Committed: Wed Aug 9 12:44:42 2017 +0800

--
 .../src/test/resources/bugs/GROOVY-8228.groovy  | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/9949525c/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
--
diff --git 
a/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy 
b/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
index 19045ae..9944a75 100644
--- a/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
+++ b/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
@@ -77,16 +77,30 @@ assert ['JSR308Interface1', 
'JSR308Interface2 e.name == 
'test')
 assert [IOException, SQLException] == 
testMethod.getAnnotatedExceptionTypes().collect(e -> e.type)
 assert 'java.util.List' == 
testMethod.getAnnotatedReturnType().type.typeName
+
+// 1)
 assert ['java.util.List', 
'java.util.List'].contains(testMethod.getAnnotatedParameterTypes().collect(e -> 
e.type.typeName).get(0))
 
 Method test2Method = JSR308Class.class.getDeclaredMethods().find(e -> e.name 
== 'test2')
 assert JSR308Class.class == test2Method.getAnnotatedReceiverType().type
 
+
+// 2)
 Parameter listParameter = testMethod.getParameters()[0]
 assert ['java.util.List', 
'java.util.List'].contains(listParameter.getAnnotatedType().type.typeName)
 
 Field nameField = JSR308Class.class.getDeclaredField('name');
 assert String.class == nameField.getAnnotatedType().type
 
+
+// 3)
 TypeVariable tv = JSR308Interface2.class.getTypeParameters()[0]
-assert [CharSequence.class] == tv.getAnnotatedBounds().collect(e -> e.type)
+assert [CharSequence.class, null].contains(tv.getAnnotatedBounds().collect(e 
-> e.type).get(0))
+
+// the above 3 tests get different result when running in the different 
CI(travis-ci and teamcity)
+// travis-ci succeeds:  https://travis-ci.org/apache/groovy/builds/262506189
+// teamcity fails:  
http://ci.groovy-lang.org/viewLog.html?buildId=41265&tab=buildResultsDiv&buildTypeId=Groovy_Jdk8Build_PlusSnapshotDeploy
+//  
http://ci.groovy-lang.org/viewLog.html?buildId=41260&tab=buildResultsDiv&buildTypeId=Groovy_Jdk8Build_PlusSnapshotDeploy
+//  
http://ci.groovy-lang.org/viewLog.html?buildId=41257&tab=buildResultsDiv&buildTypeId=Groovy_Jdk8Build_PlusSnapshotDeploy
+//
+// I guess the difference is related to the version of JDK8 deployed(Maybe it 
is a bug of Java8)



groovy git commit: Refine the test for GROOVY-8228 further

2017-08-08 Thread sunlan
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 09c84a54b -> d10beb9e9


Refine the test for GROOVY-8228 further

(cherry picked from commit abd63ab)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/d10beb9e
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/d10beb9e
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/d10beb9e

Branch: refs/heads/GROOVY_2_6_X
Commit: d10beb9e96514035b080c6a2e6fab583a32f8a73
Parents: 09c84a5
Author: sunlan 
Authored: Wed Aug 9 11:04:17 2017 +0800
Committer: sunlan 
Committed: Wed Aug 9 11:04:40 2017 +0800

--
 .../parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/d10beb9e/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
--
diff --git 
a/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy 
b/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
index 39dd35c..19045ae 100644
--- a/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
+++ b/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
@@ -83,7 +83,7 @@ Method test2Method = 
JSR308Class.class.getDeclaredMethods().find(e -> e.name ==
 assert JSR308Class.class == test2Method.getAnnotatedReceiverType().type
 
 Parameter listParameter = testMethod.getParameters()[0]
-assert 'java.util.List' == listParameter.getAnnotatedType().type.typeName
+assert ['java.util.List', 
'java.util.List'].contains(listParameter.getAnnotatedType().type.typeName)
 
 Field nameField = JSR308Class.class.getDeclaredField('name');
 assert String.class == nameField.getAnnotatedType().type



groovy git commit: Refine the test for GROOVY-8228 further

2017-08-08 Thread sunlan
Repository: groovy
Updated Branches:
  refs/heads/master 92101500a -> abd63ab77


Refine the test for GROOVY-8228 further


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/abd63ab7
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/abd63ab7
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/abd63ab7

Branch: refs/heads/master
Commit: abd63ab77ba9e306561898b9bcecfb6e0d46b094
Parents: 9210150
Author: sunlan 
Authored: Wed Aug 9 11:04:17 2017 +0800
Committer: sunlan 
Committed: Wed Aug 9 11:04:17 2017 +0800

--
 .../parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/abd63ab7/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
--
diff --git 
a/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy 
b/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
index 39dd35c..19045ae 100644
--- a/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
+++ b/subprojects/parser-antlr4/src/test/resources/bugs/GROOVY-8228.groovy
@@ -83,7 +83,7 @@ Method test2Method = 
JSR308Class.class.getDeclaredMethods().find(e -> e.name ==
 assert JSR308Class.class == test2Method.getAnnotatedReceiverType().type
 
 Parameter listParameter = testMethod.getParameters()[0]
-assert 'java.util.List' == listParameter.getAnnotatedType().type.typeName
+assert ['java.util.List', 
'java.util.List'].contains(listParameter.getAnnotatedType().type.typeName)
 
 Field nameField = JSR308Class.class.getDeclaredField('name');
 assert String.class == nameField.getAnnotatedType().type