【发布时间】:2019-03-28 07:15:10
【问题描述】:
从 grails 3.3.5 迁移 -> grails 4.0.0.M2
我的课程已经用@GrailsCompileStatic 进行了注释,并且它过去在 3.3.5 中编译时没有任何问题。
许多其他类也显示由 groovy 额外提供的方法的错误,例如 Date.parse() 或 Date.format() 或 Date.minus()
错误:
FileCommandReader.groovy: 163: [Static type checking] - Cannot find matching method java.util.Date#parse(java.lang.String, java.lang.String). Please check if the declared type is correct and if the method exists.
@ line 163, column 17.
Date expiry = Date.parse("HH:mm:ss", cols[2]);
【问题讨论】: