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


##########
server/mailet/rate-limiter/src/main/scala/org/apache/james/transport/mailets/EntityType.scala:
##########
@@ -48,62 +49,48 @@ object ConfigurationOps {
     def getOptionalSize(key: String): Option[org.apache.james.util.Size] = 
mailetConfig.getOptionalString(key)
       .map {
         case "" => throw new IllegalArgumentException(s"'$key' field cannot be 
empty if specified")
-        case s => s
+        case s  => s
       }
       .map(org.apache.james.util.Size.parse)
   }
 }
 
+object EntityType {
+  def extractRules(entityType: EntityType, duration: Duration, mailetConfig: 
MailetConfig): Option[Rules] = (entityType match {

Review Comment:
   Good question (I don't have the answer). What do you think @chibenwa 
@Arsnael ?
   
   I would also add that if you put this concern aside, the code is usually 
more cohesive with fp style.
   



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