Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Map Proxy and toString

Hans Dockter

2010-03-09

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

the following code leads to a java.lang.UnsupportedOperationException:

def runner = [
    run: { println 'x' }
] as Runnable
println runner

I see the general idea behind throwing this for unimplemented methods. But toString is a special animal.

- Hans

--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

©2008 gg3721.com - Jax Systems, LLC, U.S.A.