File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/main/java/ru/mystamps/web/support/spring/mvc Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2121import lombok .Getter ;
2222import lombok .Setter ;
2323import lombok .ToString ;
24+ import org .apache .commons .lang3 .StringUtils ;
2425
2526import javax .validation .constraints .NotEmpty ;
2627import javax .validation .constraints .NotNull ;
@@ -47,6 +48,12 @@ public enum Operation {
4748 // @todo #785 Update series: add integration test for non-empty "value" field
4849 @ NotEmpty
4950 private String value ;
51+
52+ // @initBinder with StringTrimmerEditor() doesn't work with @RequestBody, so we do that manually
53+ // @todo #1447 Add test to ensure that catalog numbers are trimmed
54+ public void setValue (String value ) {
55+ this .value = StringUtils .trimToNull (value );
56+ }
5057
5158 public Integer integerValue () {
5259 return Integer .valueOf (value );
You can’t perform that action at this time.
0 commit comments