You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2015/11/28 17:16:21 UTC
[38/46] logging-log4j2 git commit: LOG4J2-435 improved javadoc
LOG4J2-435 improved javadoc
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/20df124d
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/20df124d
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/20df124d
Branch: refs/heads/master
Commit: 20df124d69afa3eb9b213185243a4202ebde05c0
Parents: 71ce7ad
Author: rpopma <rp...@apache.org>
Authored: Sat Nov 28 16:18:30 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sat Nov 28 16:18:30 2015 +0900
----------------------------------------------------------------------
.../log4j/core/appender/rolling/action/Duration.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/20df124d/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/Duration.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/Duration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/Duration.java
index 841ada3..8508f03 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/Duration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/Duration.java
@@ -24,7 +24,8 @@ import java.util.regex.Pattern;
/**
* Simplified implementation of the <a href="https://en.wikipedia.org/wiki/ISO_8601#Durations">ISO-8601 Durations</a>
- * standard. The supported format is {@code PnDTnHnMnS}. Days are considered to be exactly 24 hours.
+ * standard. The supported format is {@code PnDTnHnMnS}, with 'P' and 'T' optional. Days are considered to be exactly 24
+ * hours.
* <p>
* Similarly to the {@code java.time.Duration} class, this class does not support year or month sections in the format.
* This implementation does not support fractions or negative values.
@@ -91,12 +92,12 @@ public class Duration implements Serializable, Comparable<Duration> {
* This implementation does not support negative numbers or fractions (so the smallest non-zero value a Duration can
* have is one second).
* <p>
- * The string starts with the ASCII letter "P" in upper or lower case. There are then four sections, each consisting
- * of a number and a suffix. The sections have suffixes in ASCII of "D", "H", "M" and "S" for days, hours, minutes
- * and seconds, accepted in upper or lower case. The suffixes must occur in order. The ASCII letter "T" must occur
- * before the first occurrence, if any, of an hour, minute or second section. At least one of the four sections must
- * be present, and if "T" is present there must be at least one section after the "T". The number part of each
- * section must consist of one or more ASCII digits. The number may not be prefixed by the ASCII negative or
+ * The string optionally starts with the ASCII letter "P" in upper or lower case. There are then four sections, each
+ * consisting of a number and a suffix. The sections have suffixes in ASCII of "D", "H", "M" and "S" for days,
+ * hours, minutes and seconds, accepted in upper or lower case. The suffixes must occur in order. The ASCII letter
+ * "T" may occur before the first occurrence, if any, of an hour, minute or second section. At least one of the four
+ * sections must be present, and if "T" is present there must be at least one section after the "T". The number part
+ * of each section must consist of one or more ASCII digits. The number may not be prefixed by the ASCII negative or
* positive symbol. The number of days, hours, minutes and seconds must parse to a {@code long}.
* <p>
* Examples: