File tree 1 file changed +7
-0
lines changed
src/main/java/ru/mystamps/web/support/spring/mvc
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 21
21
import lombok .Getter ;
22
22
import lombok .Setter ;
23
23
import lombok .ToString ;
24
+ import org .apache .commons .lang3 .StringUtils ;
24
25
25
26
import javax .validation .constraints .NotEmpty ;
26
27
import javax .validation .constraints .NotNull ;
@@ -47,6 +48,12 @@ public enum Operation {
47
48
// @todo #785 Update series: add integration test for non-empty "value" field
48
49
@ NotEmpty
49
50
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
+ }
50
57
51
58
public Integer integerValue () {
52
59
return Integer .valueOf (value );
You can’t perform that action at this time.
0 commit comments