Migration from grails 3.3.5 -> grails 4.0.0.M2
My class has been annotated with @GrailsCompileStatic
& it used to compile without any issues in 3.3.5.
Many other classes are also showing errors for methods which are additionally provided by groovy such as Date.parse()
or Date.format()
or Date.minus()
Error:
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]);