Skip to content

Commit

Permalink
Remove java.time.Duration converter
Browse files Browse the repository at this point in the history
  • Loading branch information
ppkarwasz committed Mar 30, 2024
1 parent ea83bb7 commit b1c9cd8
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.nio.file.Paths;
import java.security.Provider;
import java.security.Security;
import java.time.Duration;
import java.util.UUID;
import java.util.regex.Pattern;
import org.apache.logging.log4j.Level;
Expand Down Expand Up @@ -226,7 +225,7 @@ public Double convert(final String s) {
/**
* Converts a {@link String} into a {@link org.apache.logging.log4j.core.appender.rolling.action.Duration}.
* @since 2.5
* @deprecated since 2.24.0 use {@link JavaDurationConverter}
* @deprecated since 2.24.0. A {@link java.time.Duration} converter will be available in 3.0.0.
*/
@Plugin(name = "Duration", category = CATEGORY)
@Deprecated
Expand All @@ -238,18 +237,6 @@ public org.apache.logging.log4j.core.appender.rolling.action.Duration convert(fi
}
}

/**
* Converts a {@link String} into a {@link Duration}.
* @since 2.24.0
*/
@Plugin(name = "JavaDuration", category = CATEGORY)
public static class JavaDurationConverter implements TypeConverter<Duration> {
@Override
public Duration convert(final String s) {
return Duration.parse(s);
}
}

/**
* Converts a {@link String} into a {@link File}.
*/
Expand Down

0 comments on commit b1c9cd8

Please sign in to comment.