You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/12/20 17:24:19 UTC
[groovy] branch master updated: Move tests to fix weird exception
occurred only on zulu JDK 11.0.5(ubuntu)
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 870244c Move tests to fix weird exception occurred only on zulu JDK 11.0.5(ubuntu)
870244c is described below
commit 870244cd157ed0bb74430e9c235804823ba2f320
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Dec 21 01:23:15 2019 +0800
Move tests to fix weird exception occurred only on zulu JDK 11.0.5(ubuntu)
See:
https://pipelines.actions.githubusercontent.com/jEQJx6aVIMasUiQpy6TlKzY89nERxcoEfA7W2lq6ikiWDlN5Fx/_apis/pipelines/1/runs/163/signedlogcontent/5?urlExpires=2019-12-20T17%3A23%3A11.4504485Z&urlSigningMethod=HMACV1&urlSignature=a8aONyqHjuG13XhEfAI2Tvjo1eK83su2fJipQwVZ2q0%3D
2019-12-20T16:09:07.9493747Z org.codehaus.groovy.transform.classloading.TransformsAndCustomClassLoadersTest > testThirdPartyLocalTransform FAILED
2019-12-20T16:09:07.9493968Z java.lang.TypeNotPresentException: Type javax.tools.JavaFileObject not present
2019-12-20T16:09:07.9494139Z at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
2019-12-20T16:09:07.9494385Z at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
2019-12-20T16:09:07.9494566Z at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
2019-12-20T16:09:07.9494804Z at java.base/sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
2019-12-20T16:09:07.9494953Z at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
2019-12-20T16:09:07.9495083Z at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
2019-12-20T16:09:07.9495410Z at java.base/sun.reflect.generics.repository.ConstructorRepository.computeParameterTypes(ConstructorRepository.java:111)
2019-12-20T16:09:07.9495575Z at java.base/sun.reflect.generics.repository.ConstructorRepository.getParameterTypes(ConstructorRepository.java:87)
2019-12-20T16:09:07.9495726Z at java.base/java.lang.reflect.Executable.getGenericParameterTypes(Executable.java:279)
2019-12-20T16:09:07.9495874Z at java.base/java.lang.reflect.Method.getGenericParameterTypes(Method.java:330)
2019-12-20T16:09:07.9496031Z at java.desktop/java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:391)
2019-12-20T16:09:07.9496566Z at java.desktop/java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:118)
2019-12-20T16:09:07.9496698Z at java.desktop/java.beans.MethodDescriptor.<init>(MethodDescriptor.java:74)
2019-12-20T16:09:07.9496851Z at java.desktop/java.beans.MethodDescriptor.<init>(MethodDescriptor.java:58)
2019-12-20T16:09:07.9496998Z at java.desktop/java.beans.Introspector.getTargetMethodInfo(Introspector.java:1047)
2019-12-20T16:09:07.9497151Z at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:462)
2019-12-20T16:09:07.9497276Z at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:205)
2019-12-20T16:09:07.9497508Z at groovy.lang.MetaClassImpl.lambda$addProperties$4(MetaClassImpl.java:3398)
2019-12-20T16:09:07.9497632Z at java.base/java.security.AccessController.doPrivileged(Native Method)
2019-12-20T16:09:07.9497901Z at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3398)
2019-12-20T16:09:07.9498160Z at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3379)
2019-12-20T16:09:07.9498309Z at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:287)
2019-12-20T16:09:07.9498577Z at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:329)
2019-12-20T16:09:07.9498704Z at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:258)
2019-12-20T16:09:07.9498852Z at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1000)
2019-12-20T16:09:07.9499007Z at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.compareEqual(DefaultTypeTransformation.java:654)
2019-12-20T16:09:07.9499241Z at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.compareEqual(ScriptBytecodeAdapter.java:708)
2019-12-20T16:09:07.9499416Z at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.compareNotEqual(ScriptBytecodeAdapter.java:712)
2019-12-20T16:09:07.9499654Z at org.codehaus.groovy.transform.classloading.TransformsAndCustomClassLoadersTest.setUp(TransformsAndCustomClassLoadersTest.groovy:62)
2019-12-20T16:09:07.9499745Z
2019-12-20T16:09:07.9499863Z Caused by:
2019-12-20T16:09:07.9499988Z java.lang.ClassNotFoundException: javax.tools.JavaFileObject
2019-12-20T16:09:07.9500121Z at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
2019-12-20T16:09:07.9500238Z at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
2019-12-20T16:09:07.9500374Z at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
2019-12-20T16:09:07.9500512Z at java.base/java.lang.Class.forName0(Native Method)
2019-12-20T16:09:07.9500641Z at java.base/java.lang.Class.forName(Class.java:398)
2019-12-20T16:09:08.0513460Z at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
2019-12-20T16:09:08.0513630Z ... 28 more
---
src/test/groovy/bugs/Groovy9324.groovy | 50 ++++++++++++++++++++++
.../ast/builder/AstStringCompilerTest.groovy | 39 -----------------
2 files changed, 50 insertions(+), 39 deletions(-)
diff --git a/src/test/groovy/bugs/Groovy9324.groovy b/src/test/groovy/bugs/Groovy9324.groovy
new file mode 100644
index 0000000..cfd1803
--- /dev/null
+++ b/src/test/groovy/bugs/Groovy9324.groovy
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package groovy.bugs
+
+import groovy.transform.CompileStatic
+import org.junit.Test
+
+import static groovy.test.GroovyAssert.assertScript
+
+@CompileStatic
+final class Groovy9324 {
+
+ @Test
+ void testAstStringCompilerCompile() {
+ assertScript '''
+ import org.codehaus.groovy.ast.builder.AstStringCompiler
+ import org.codehaus.groovy.ast.builder.AstAssert
+ import static org.codehaus.groovy.ast.tools.GeneralUtils.block
+ import static org.codehaus.groovy.ast.tools.GeneralUtils.constX
+ import static org.codehaus.groovy.ast.tools.GeneralUtils.stmt
+
+ def actual = new AstStringCompiler().compile(""" "Hello World" """)
+ def expected = [
+ block(
+ stmt(
+ constX("Hello World")
+ )
+ )
+ ]
+ AstAssert.assertSyntaxTree(expected, actual)
+ '''
+ }
+
+}
diff --git a/src/test/org/codehaus/groovy/ast/builder/AstStringCompilerTest.groovy b/src/test/org/codehaus/groovy/ast/builder/AstStringCompilerTest.groovy
deleted file mode 100644
index 575768e..0000000
--- a/src/test/org/codehaus/groovy/ast/builder/AstStringCompilerTest.groovy
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.codehaus.groovy.ast.builder
-
-import groovy.test.GroovyTestCase
-
-import static org.codehaus.groovy.ast.tools.GeneralUtils.block
-import static org.codehaus.groovy.ast.tools.GeneralUtils.constX
-import static org.codehaus.groovy.ast.tools.GeneralUtils.stmt
-
-class AstStringCompilerTest extends GroovyTestCase {
- void testCompile() {
- def actual = new AstStringCompiler().compile(""" "Hello World" """)
- def expected = [
- block(
- stmt(
- constX("Hello World")
- )
- )
- ]
- AstAssert.assertSyntaxTree(expected, actual)
- }
-}