groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <keeganw...@gmail.com>
Subject MissingMethodException Date.format() in GroovyDoc root template
Date Tue, 12 Jun 2018 04:13:21 GMT
Have we made any breaking changes to GroovyDoc?  The GroovyDoc root
template is failing to find a GDK method now, but I'm not seeing what
changed.  Using the same template in a console works

new groovy.text.GStringTemplateEngine().createTemplate("${new
Date().format('yyyy-MM-dd')}").make([:]).toString()

-Keegan

groovy.lang.MissingMethodException: No signature of method:
java.util.Date.format() is applicable for argument types: (String) values:
[yyyy-MM-dd]
Possible solutions: from(java.time.Instant), getAt(java.lang.String),
parse(java.lang.String), print(java.lang.Object), print(java.io.PrintWriter)
        at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:72)
        at
org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:48)
        at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
        at
groovy.tmp.templates.GStringTemplateScript5$_getTemplate_closure1.doCall(GStringTemplateScript5.groovy:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326)
        at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:421)
        at groovy.lang.Closure$WritableClosure.writeTo(Closure.java:861)
        at groovy.lang.Closure$WritableClosure.toString(Closure.java:987)
        at
org.codehaus.groovy.tools.groovydoc.GroovyDocTemplateEngine.applyRootDocTemplate(GroovyDocTemplateEngine.java:131)

Mime
View raw message