theshoeshiner commented on code in PR #1062:
URL: https://github.com/apache/commons-lang/pull/1062#discussion_r1284520052
##########
src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java:
##########
@@ -621,22 +672,23 @@ static boolean containsTokenWithValue(final Token[]
tokens, final Object value)
private final Object value;
private int count;
- private boolean optional = false;
-
+ private int optionalIndex = -1;
Token(final Object value) {
this.value = value;
this.count = 1;
}
-
+
/**
* Wraps a token around a value. A value would be something like a 'Y'.
*
* @param value to wrap, non-null.
*/
- Token(final Object value, final boolean optional) {
+ Token(final Object value, final boolean optional, final int
optionalIndex) {
Review Comment:
I found the presence of the test-only constructors odd as well. I went ahead
and removed them and replaced with a helper method on the test class.
--
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]