Arsnael commented on code in PR #1670:
URL: https://github.com/apache/james-project/pull/1670#discussion_r1288214890


##########
core/src/main/java/org/apache/james/core/quota/QuotaComponent.java:
##########
@@ -23,6 +23,14 @@
 
 public class QuotaComponent extends StringWrapper {
 
+    public static final QuotaComponent MAILBOX = of("mailbox");
+    public static final QuotaComponent SIEVE = of("sieve");
+    public static final QuotaComponent JMAP_UPLOADS = of("jmapUploads");
+
+    public static QuotaComponent of(String value) {

Review Comment:
   What's the point here?
   
   Could just do `public static final QuotaComponent MAILBOX = new 
QuotaComponent("mailbox");` right?



##########
core/src/main/java/org/apache/james/core/quota/QuotaLimit.java:
##########
@@ -20,25 +20,26 @@
 package org.apache.james.core.quota;
 
 import java.util.Objects;
+import java.util.Optional;
 
 public class QuotaLimit {
 
-    public static QuotaLimit of(QuotaComponent component, QuotaScope scope, 
String identifier, QuotaType quotaType, long limit) {
+    public static QuotaLimit of(QuotaComponent component, QuotaScope scope, 
String identifier, QuotaType quotaType, Long limit) {

Review Comment:
   Missed that the first time but is that static method useful here as well?



##########
core/src/main/java/org/apache/james/core/quota/QuotaType.java:
##########
@@ -23,6 +23,13 @@
 
 public class QuotaType extends StringWrapper {
 
+    public static final QuotaType COUNT = of("count");
+    public static final QuotaType SIZE = of("size");
+
+    public static QuotaType of(String value) {

Review Comment:
   idem



##########
core/src/main/java/org/apache/james/core/quota/QuotaScope.java:
##########
@@ -23,6 +23,14 @@
 
 public class QuotaScope extends StringWrapper {
 
+    public static final QuotaScope GLOBAL = of("global");
+    public static final QuotaScope DOMAIN = of("domain");
+    public static final QuotaScope USER = of("user");
+
+    public static QuotaScope of(String value) {

Review Comment:
   Idem



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to