We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 252dc70 commit a6b65beCopy full SHA for a6b65be
src/main/java/ru/mystamps/web/validation/jsr303/MaxFileSize.java
@@ -24,6 +24,9 @@
24
import javax.validation.Constraint;
25
import javax.validation.Payload;
26
27
+import lombok.Getter;
28
+import lombok.RequiredArgsConstructor;
29
+
30
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
31
import static java.lang.annotation.ElementType.FIELD;
32
import static java.lang.annotation.ElementType.METHOD;
@@ -43,17 +46,11 @@
43
46
long value();
44
47
Unit unit();
45
48
49
+ @Getter
50
+ @RequiredArgsConstructor
51
enum Unit {
52
bytes(1), Kbytes(1024), Mbytes(1024 * 1024);
53
- private long size;
-
- Unit(long size) {
- this.size = size;
- }
54
55
- public long getSize() {
56
- return size;
57
+ private final long size;
58
}
59
0 commit comments