java - Groovy abstract controller <Domain Class> -
embarrassed, can't find errors in ways. no matter try m object (not actual generic type). have simple setup(m grails domain):
class newscontroller extends abstractcontroller<news> { } class abstractcontroller<m> { def show(long id){ log.info(m) // prints: info common.abstractcontroller - class java.lang.object def entity = m.get(id) //errors // .. other code } } please gentle, feels brain fart/something stupid.
i type erasure(or groovy equivalent).
so m there compile time checking(at least in java). how works in interpreted language little more interesting, think victim of related circumstances.
it appears groovy has stricter requirements throwing away generic information source completely. leads interesting behavioral stuff @ runtime.
Comments
Post a Comment