“Why are you using Fire Fox?” pool
Posted by admin - 18/12/09 at 03:12:15 pmI loved Fire Fox. Really and deeply. But let face the truth, at this moment there are better and faster browsers. I personally use FF because it have one grate feature - Fire Bug. And this is only reason why i don't use Chrome for all the time. So - if you are using Fire Fox - drop your voice.
December 18, 2009 | In Uncategorized | No Comments
Groovy List.contains / GString fuss
Posted by admin - 17/12/09 at 10:12:47 amIf you want to search for String value in the List using contains method, be careful if the argument is GString type.
def foo = 1 assert !['1','2','3'].contains("${foo}") assert ['1','2','3'].contains("${foo}".toString())
Why? Because contains use equals method to match your parameter to each position on the list, and for equals we have:
def foo = "groovy" def bar = "groovy${''}" assert foo.class == java.lang.String assert bar.class == org.codehaus.groovy.runtime.GStringImpl assert foo == bar assert bar == foo assert !foo.equals(bar) assert !bar.equals(foo)
December 17, 2009 | In Groovy | No Comments
Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds.
Valid XHTML and CSS.