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

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

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


##########
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 expect it to be mostly table but maybe more entity types (HeaderCount? Maybe more inventive people that me can find new ideas?)



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