Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Cannot Reproduce
-
1.6-beta-1
-
None
-
None
Description
Both tests in the appended code fails with an uncaught exception under 1.6.
class G16BugTest extends GroovyTestCase { void testAssert() { try { new G16BugHelper().check() } catch (AssertionError e) { // ignore } } void testCopy() { def inst = new Copy() inst.sourceDir = '/Users/hans/tmp/garbage/d1/' as File inst.targetDir = '/Users/hans/tmp/garbage/d2/' as File inst.execute() } } class G16BugHelper { void check() { assert 0 > 1 } } class Copy { File sourceDir File targetDir void execute() { AntBuilder ant = new AntBuilder() ant.copy(todir: targetDir) { fileset(dir: sourceDir) } } }
testAssert fails with:
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.AssertionError: Expression: (0 > 1) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:743) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:769) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:749) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:160) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:185) at G16BugTest.testAssert(G16BugTest.groovy:6) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40) Caused by: java.lang.AssertionError: Expression: (0 > 1) at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:372) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:642) at G16BugHelper.check(G16BugTest.groovy:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) ... 26 more
testCopy fails with
org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: Copy.fileset() is applicable for argument types: (java.util.LinkedHashMap) values: {[dir:/Users/hans/tmp/garbage/d1]} at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:743) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:769) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:749) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:160) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:185) at G16BugTest.testCopy(G16BugTest.groovy:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40) Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: Copy.fileset() is applicable for argument types: (java.util.LinkedHashMap) values: {[dir:/Users/hans/tmp/garbage/d1]} at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:743) at groovy.lang.Closure.call(Closure.java:292) at groovy.lang.Closure.call(Closure.java:287) at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:148) at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:149) at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:775) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:749) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:160) at Copy.execute(G16BugTest.groovy:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) ... 26 more Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: Copy.fileset() is applicable for argument types: (java.util.LinkedHashMap) values: {[dir:/Users/hans/tmp/garbage/d1]} at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:76) at Copy$_execute_closure1.doCall(G16BugTest.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) ... 43 more Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: Copy.fileset() is applicable for argument types: (java.util.LinkedHashMap) values: {[dir:/Users/hans/tmp/garbage/d1]} at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:743) at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:757) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:745) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:160) at Copy.invokeMethod(G16BugTest.groovy) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:371) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:322) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:76) at Copy$_execute_closure1.doCall(G16BugTest.groovy:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) ... 52 more Caused by: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: Copy.fileset() is applicable for argument types: (java.util.LinkedHashMap) values: {[dir:/Users/hans/tmp/garbage/d1]}