ppkarwasz commented on code in PR #2424:
URL: https://github.com/apache/logging-log4j2/pull/2424#discussion_r1544550920


##########
log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java:
##########
@@ -64,6 +68,8 @@ public final class PropertiesUtil {
     private static final Lazy<PropertiesUtil> COMPONENT_PROPERTIES =
             Lazy.lazy(() -> new PropertiesUtil(LOG4J_PROPERTIES_FILE_NAME, 
false));
 
+    private static final Pattern DURATION_PATTERN = 
Pattern.compile("([+-]?\\d+)\\s*(\\w+)?", Pattern.CASE_INSENSITIVE);

Review Comment:
   I don't think such an optimization is necessary: the `getDurationProperty` 
method is only maintained for BC and is not used by any of our artifacts.
   
   In Log4j Core I would prefer a standard `Duration.of` converter instead of 
this custom format.



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

Reply via email to