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

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

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


##########
server/mailet/rate-limiter/src/main/scala/org/apache/james/transport/mailets/GlobalRateLimit.scala:
##########
@@ -108,8 +109,10 @@ class GlobalRateLimit @Inject()(rateLimiterFactory: RateLimiterFactory) extends
   private var keyPrefix: Option[KeyPrefix] = _
 
   override def init(): Unit = {
-    val duration: Duration = parseDuration()
-    val precision: Option[Duration] = parsePrecision()
+    val duration: Duration = getMailetConfig.getDuration("duration")

Review Comment:
   scoping the DurationOps import to the init method would reduce compiler work 



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