From commits-return-10311-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Fri Dec 20 17:24:21 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B3F8218064C for ; Fri, 20 Dec 2019 18:24:20 +0100 (CET) Received: (qmail 77507 invoked by uid 500); 20 Dec 2019 17:24:20 -0000 Mailing-List: contact commits-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list commits@groovy.apache.org Received: (qmail 77498 invoked by uid 99); 20 Dec 2019 17:24:20 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Dec 2019 17:24:20 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 950BF8D80D; Fri, 20 Dec 2019 17:24:19 +0000 (UTC) Date: Fri, 20 Dec 2019 17:24:19 +0000 To: "commits@groovy.apache.org" Subject: [groovy] branch master updated: Move tests to fix weird exception occurred only on zulu JDK 11.0.5(ubuntu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <157686265921.24241.16836096750480290239@gitbox.apache.org> From: sunlan@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: groovy X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3b99603f0c91bd571ff3f10256dfb979d6ce48ce X-Git-Newrev: 870244cd157ed0bb74430e9c235804823ba2f320 X-Git-Rev: 870244cd157ed0bb74430e9c235804823ba2f320 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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.(MethodDescriptor.java:74) 2019-12-20T16:09:07.9496851Z at java.desktop/java.beans.MethodDescriptor.(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) - } -}