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