thymeleaf-spring icon indicating copy to clipboard operation
thymeleaf-spring copied to clipboard

`type` parameter of `RequestDataValueProcessor#processFieldValue` shouldn't be null

Open sakuna63 opened this issue 3 years ago • 0 comments

SpringValueTagProcessor could pass null value as type parameter of RequestDataValueProcessor#processFieldValue although type is defined as Nonnull parameter(not annotated @Nullable)in spring-framework.

https://github.com/thymeleaf/thymeleaf-spring/blob/3.1-master/thymeleaf-spring5/src/main/java/org/thymeleaf/spring5/processor/SpringValueTagProcessor.java#L103-L106

For example, when SpringValueTagProcessor process <option value="aaa">, type will be null (because option has no type attribute).

In the scenario like above example, i think IElementTag#getElementCompleteName should be used as type value.

I'll send small PR to fix this issue later. thaks.

sakuna63 avatar Feb 05 '22 14:02 sakuna63