-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
8
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The javadoc order list of java.util.Format argument_indexes starts at index one. This causes the useable pattern arguments to be off by one. The first example states: "This prints 1 line with the log level (4$), the log message (5$) and the timestamp (1$) in a square bracket." In the order list level is 5 and message is 6 and timestamp is 2. Constructing or deconstructing formatter patterns would be much easier if these indexes matched in ordered list.
The fix used in com.sun.mail.util.logging.CompactFormatter was to make the ordered list start at zero by using "<ol start='0'>"
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
View the javadocs for SimpleFormatter and attempt to copy and paste the argument index to build a formatter pattern. Or view a SimpleFormatter pattern and use the ordered list to determine meaning.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Ordered list elements match the $[argument_index]
ACTUAL -
Results are off by one.
CUSTOMER SUBMITTED WORKAROUND :
Shift the indexes.
FREQUENCY : always
The javadoc order list of java.util.Format argument_indexes starts at index one. This causes the useable pattern arguments to be off by one. The first example states: "This prints 1 line with the log level (4$), the log message (5$) and the timestamp (1$) in a square bracket." In the order list level is 5 and message is 6 and timestamp is 2. Constructing or deconstructing formatter patterns would be much easier if these indexes matched in ordered list.
The fix used in com.sun.mail.util.logging.CompactFormatter was to make the ordered list start at zero by using "<ol start='0'>"
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
View the javadocs for SimpleFormatter and attempt to copy and paste the argument index to build a formatter pattern. Or view a SimpleFormatter pattern and use the ordered list to determine meaning.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Ordered list elements match the $[argument_index]
ACTUAL -
Results are off by one.
CUSTOMER SUBMITTED WORKAROUND :
Shift the indexes.
FREQUENCY : always