You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/10/03 13:47:04 UTC
[commons-lang] branch master updated: Reuse constant
This is an automated email from the ASF dual-hosted git repository.
ggregory 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 341b578b4 Reuse constant
341b578b4 is described below
commit 341b578b4fc2a85e107e7b2166cac8447cabbabf
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Oct 3 09:46:58 2022 -0400
Reuse constant
Format tweak
---
src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java | 2 +-
.../apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
index 156afd8c7..6ed587dae 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
@@ -166,7 +166,7 @@ public class FastDatePrinter implements DatePrinter, Serializable {
rules = rulesList.toArray(EMPTY_RULE_ARRAY);
int len = 0;
- for (int i=rules.length; --i >= 0; ) {
+ for (int i = rules.length; --i >= 0;) {
len += rules[i].estimateLength();
}
diff --git a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
index b831b3178..ef9bf2561 100644
--- a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
+++ b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
@@ -30,6 +30,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.AbstractLangTest;
+import org.apache.commons.lang3.ArrayUtils;
import org.junit.jupiter.api.Test;
/**
@@ -407,8 +408,7 @@ public class EventCountCircuitBreakerTest extends AbstractLangTest {
* @param values the expected values
*/
public void verify(final Boolean... values) {
- assertArrayEquals(values,
- changedValues.toArray(new Boolean[0]));
+ assertArrayEquals(values, changedValues.toArray(ArrayUtils.EMPTY_BOOLEAN_OBJECT_ARRAY));
}
}
}