thymeleaf / thymeleaf-spring

Thymeleaf integration module for Spring
http://www.thymeleaf.org
Apache License 2.0
434 stars 156 forks source link

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

Open sakuna63 opened 2 years ago

sakuna63 commented 2 years ago

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.