ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

AtomicBoolean generates NPE with g++ 0.2.5 #243

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is working fine

import java.util.concurrent.atomic.AtomicBoolean

//@Typed
class LogParser{
    AtomicBoolean busy = new AtomicBoolean(false)
    static main(args){
        new LogParser()
    }
} 

... but this is not
import java.util.concurrent.atomic.AtomicBoolean

@Typed
class LogParser{
    AtomicBoolean busy = new AtomicBoolean(false)
    static main(args){
        new LogParser()
    }
}

Exception thrown
2010-jun-05 15:10:48 org.codehaus.groovy.runtime.StackTraceUtils sanitize

VARNING: Sanitizing stacktrace:

java.lang.NullPointerException

    at LogParser.<init>(ConsoleScript0)

    at LogParser.main(ConsoleScript0:7)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)

    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

    at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1302)

    at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:759)

    at
groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:271)

    at groovy.lang.GroovyShell.run(GroovyShell.java:513)

    at groovy.lang.GroovyShell.run(GroovyShell.java:170)

    at groovy.lang.GroovyShell$run.call(Unknown Source)

    at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.jav
a:40)

    at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java
:117)

    at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java
:133)

    at groovy.ui.Console$_runScriptImpl_closure16.doCall(Console.groovy:878)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)

    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

    at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaC
lass.java:273)

    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

    at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClass
Site.java:66)

    at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteAr
ray.java:44)

    at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSi
te.java:143)

    at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSi
te.java:151)

    at groovy.ui.Console$_runScriptImpl_closure16.doCall(Console.groovy)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)

    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

    at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaC
lass.java:273)

    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

    at groovy.lang.Closure.call(Closure.java:276)

    at groovy.lang.Closure.call(Closure.java:271)

    at groovy.lang.Closure.run(Closure.java:354)

    at java.lang.Thread.run(Thread.java:619)

java.lang.NullPointerException

    at LogParser.<init>(ConsoleScript0)

    at LogParser.main(ConsoleScript0:7) 

Original issue reported on code.google.com by innekatt...@googlemail.com on 5 Jun 2010 at 1:12

GoogleCodeExporter commented 8 years ago

Original comment by alex.tka...@gmail.com on 5 Jun 2010 at 1:15