You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "Arsnael (via GitHub)" <gi...@apache.org> on 2023/02/27 03:03:12 UTC

[GitHub] [james-project] Arsnael commented on a diff in pull request #1463: Refactoring series focused on scala style

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


##########
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 don't really have a proper answer either but I'm ok with the change



-- 
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: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org