jeantil commented on code in PR #1463:
URL: https://github.com/apache/james-project/pull/1463#discussion_r1115681488


##########
server/mailet/rate-limiter/src/main/scala/org/apache/james/transport/mailets/EntityType.scala:
##########
@@ -36,12 +36,22 @@ object ConfigurationOps {
 
   implicit class OptionOps(mailetConfig: MailetConfig) {
     def getOptionalString(key: String): Option[String] = 
Option(mailetConfig.getInitParameter(key))
+    def getOptionalLong(key: String): Option[Long] = 
Option(mailetConfig.getInitParameter(key)).map(_.toLong)
   }
 
   implicit class DurationOps(mailetConfig: MailetConfig) {
     def getDuration(key: String): Option[Duration] = 
mailetConfig.getOptionalString(key)
       .map(string => DurationParser.parse(string, ChronoUnit.SECONDS))
   }
+
+  implicit class SizeOps(mailetConfig: MailetConfig) {
+    def getOptionalSize(key: String): Option[org.apache.james.util.Size] = 
mailetConfig.getOptionalString(key)

Review Comment:
   same argument as previous comment



-- 
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