This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 9599c2de8 [javadoc] StopWatch: split() can be called more than once
(#1899)
9599c2de8 is described below
commit 9599c2de889eeddadf569747a9dac3c3655e4d14
Author: Sergi Parpal <[email protected]>
AuthorDate: Sun Nov 29 16:18:17 2026 +0100
[javadoc] StopWatch: split() can be called more than once (#1899)
The class Javadoc says that split(), suspend(), or stop() cannot be
invoked twice. suspend() and stop() do throw IllegalStateException the
second time, but split() only requires the watch to be running. It has
done so since the rule was written for Lang 2.1, and since 3.20.0 each
call adds a split to getSplits(). StopWatchTest's
testSplitsWithStringLabels() splits three times in a row.
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
src/main/java/org/apache/commons/lang3/time/StopWatch.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/lang3/time/StopWatch.java
b/src/main/java/org/apache/commons/lang3/time/StopWatch.java
index 0f0e073ff..3fad94efd 100644
--- a/src/main/java/org/apache/commons/lang3/time/StopWatch.java
+++ b/src/main/java/org/apache/commons/lang3/time/StopWatch.java
@@ -57,7 +57,7 @@
* </p>
*
* <ol>
- * <li>{@link #split()}, {@link #suspend()}, or {@link #stop()} cannot be
invoked twice</li>
+ * <li>{@link #suspend()} or {@link #stop()} cannot be invoked twice</li>
* <li>{@link #unsplit()} may only be called if the watch has been {@link
#split()}</li>
* <li>{@link #resume()} may only be called if the watch has been {@link
#suspend()}</li>
* <li>{@link #start()} cannot be called twice without calling {@link
#reset()}</li>