diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2022-01-12 02:00:41 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-01-18 16:11:57 +0100 |
commit | a268faf729abae09d677d4e465e68c432dfb8a7f (patch) | |
tree | 051972d7950f89930b0598b6094aee7bf7d8cf6b /org.eclipse.jgit.junit.http | |
parent | 6fde4d3a6c4cc0dbf649d2721bebf35678656f9f (diff) | |
download | jgit-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.java | 6 |
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("{}"); |