aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit.http
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2022-01-12 02:00:41 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2022-01-18 16:11:57 +0100
commita268faf729abae09d677d4e465e68c432dfb8a7f (patch)
tree051972d7950f89930b0598b6094aee7bf7d8cf6b /org.eclipse.jgit.junit.http
parent6fde4d3a6c4cc0dbf649d2721bebf35678656f9f (diff)
downloadjgit-a268faf729abae09d677d4e465e68c432dfb8a7f.tar.gz
jgit-a268faf729abae09d677d4e465e68c432dfb8a7f.zip
[errorprone] Fix InfiniteRecursion error in RecordingLogger
Change-Id: I092389e428232a4fe7613d846c288d285ae9102c
Diffstat (limited to 'org.eclipse.jgit.junit.http')
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
index 9c3c980ad8..af63084e93 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
@@ -180,11 +180,15 @@ public class RecordingLogger extends MarkerIgnoringBase {
@Override
public void warn(String format, Object arg) {
- warn(format, Collections.singleton(arg));
+ addWarnings(format, Collections.singleton(arg));
}
@Override
public void warn(String format, Object... arguments) {
+ addWarnings(format, arguments);
+ }
+
+ private void addWarnings(String format, Object... arguments) {
synchronized (warnings) {
int i = 0;
int index = format.indexOf("{}");