jechlin opened a new pull request #1168: demonstration of problem when a 
reloaded class has generic parameters
URL: https://github.com/apache/groovy/pull/1168
 
 
   When the sub-class is reloaded (line 110), this produces an exception:
   
       startup failed:
       map://local/SubClass.groovy: 2: The class BaseClass<String> (supplied 
with 1 type parameter) refers to the class BaseClass which takes no parameters
        @ line 2, column 36.
                      class SubClass extends BaseClass<String> {
                                             ^
       
       1 error
       
       org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
failed:
       map://local/SubClass.groovy: 2: The class BaseClass<String> (supplied 
with 1 type parameter) refers to the class BaseClass which takes no parameters
        @ line 2, column 36.
                      class SubClass extends BaseClass<String> {
                                             ^
       
       1 error
       
           at 
org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:287)
           at 
org.codehaus.groovy.control.CompilationUnit$IPrimaryClassNodeOperation.doPhaseOperation(CompilationUnit.java:963)
           at 
org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:650)
           at 
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:627)
           at 
groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:367)
           at 
groovy.lang.GroovyClassLoader.lambda$parseClass$2(GroovyClassLoader.java:310)
           at 
org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
           at 
org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
           at 
groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:308)
           at 
groovy.util.GroovyScriptEngine$ScriptClassLoader.doParseClass(GroovyScriptEngine.java:231)
           at 
groovy.util.GroovyScriptEngine$ScriptClassLoader.parseClass(GroovyScriptEngine.java:218)
           at 
groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:292)
           at 
groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:257)
           at 
groovy.util.GroovyScriptEngine.loadScriptByName(GroovyScriptEngine.java:528)
           at groovy.util.GroovyScriptEngine$loadScriptByName.call(Unknown 
Source)
           at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
           at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
           at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
           at 
groovy.util.GroovyScriptEngineReloadingTest.testRecompilingWithGenerics(GroovyScriptEngineReloadingTest.groovy:110)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at junit.framework.TestCase.runTest(TestCase.java:177)
           at junit.framework.TestCase.runBare(TestCase.java:142)
           at junit.framework.TestResult$1.protect(TestResult.java:122)
           at junit.framework.TestResult.runProtected(TestResult.java:142)
           at junit.framework.TestResult.run(TestResult.java:125)
           at junit.framework.TestCase.run(TestCase.java:130)
           at junit.framework.TestSuite.runTest(TestSuite.java:241)
           at junit.framework.TestSuite.run(TestSuite.java:236)
           at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
           at 
org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110)
           at 
org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
           at 
org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
           at 
org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
           at 
org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at 
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
           at 
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
           at 
org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
           at 
org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
           at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
           at 
org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at 
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
           at 
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
           at 
org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
           at 
org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
           at 
org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412)
           at 
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
           at 
org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at 
org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
           at java.lang.Thread.run(Thread.java:748)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to