Skip to content

Commit c2e0dc2

Browse files
committed
Use deprecated class internally in builder
By using the deprecated class internally, we benefit from the more lax parsing rules, withouth exposing the class in the API.
1 parent 8660c3e commit c2e0dc2

File tree

1 file changed

+2
-2
lines changed
  • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action

1 file changed

+2
-2
lines changed

log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfLastModified.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ public static Builder newBuilder() {
117117
public static final class Builder implements org.apache.logging.log4j.core.util.Builder<IfLastModified> {
118118
@PluginBuilderAttribute
119119
@Required(message = "No age provided for IfLastModified")
120-
private Duration age;
120+
private org.apache.logging.log4j.core.appender.rolling.action.Duration age;
121121

122122
@PluginElement("nestedConditions")
123123
private PathCondition[] nestedConditions;
124124

125125
public Builder setAge(final Duration age) {
126-
this.age = age;
126+
this.age = org.apache.logging.log4j.core.appender.rolling.action.Duration.ofMillis(age.toMillis());
127127
return this;
128128
}
129129

0 commit comments

Comments
 (0)