Closed sunmingtao closed 4 years ago
Interface default methods (Path.toFile()
) are not exposed in Freemarker template by default.
https://stackoverflow.com/questions/30503889/freemarker-and-java8-default-methods
Then I find some non default methods, such as Path.normalize()
, are also not exposed.
That's because the return type of Path.normalize()
is Path
, while the return type of WindowsPath.normalize()
is WindowsPath
. For the method to be exposed in the template, the return type must be the same.
path.toFile()
evaluates to null on Freemarker.