summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2024-04-29 01:11:16 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2024-04-29 15:20:42 +0200
commit85602eaa98aefefdf023317db02f774a80bfeda4 (patch)
treeb37ab08207a21848ca5eecce97d2d5f8e7492b12 /org.eclipse.jgit.test
parent07e77293b1e84fddfdc5edbb378021a93427c971 (diff)
downloadjgit-85602eaa98aefefdf023317db02f774a80bfeda4.tar.gz
jgit-85602eaa98aefefdf023317db02f774a80bfeda4.zip
[errorprone] Fix pattern BadImport
See https://errorprone.info/bugpattern/BadImport Change-Id: I24e5a7a4a64d8b3cf2cc3d394090ce90e849f9f9
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java5
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java3
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java5
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java4
4 files changed, 7 insertions, 10 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java
index 96a064989b..8c1b4f7b65 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java
@@ -10,7 +10,6 @@
package org.eclipse.jgit.internal.storage.file;
-import static java.lang.Integer.valueOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
@@ -73,7 +72,7 @@ public class GcConcurrentTest extends GcTestCase {
try {
gc.setProgressMonitor(this);
gc.repack();
- return valueOf(0);
+ return Integer.valueOf(0);
} catch (IOException e) {
// leave the syncPoint in broken state so any awaiting
// threads and any threads that call await in the future get
@@ -84,7 +83,7 @@ public class GcConcurrentTest extends GcTestCase {
} catch (InterruptedException ignored) {
//
}
- return valueOf(1);
+ return Integer.valueOf(1);
}
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
index 5c44c9c44d..3ec4b6a073 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
@@ -11,7 +11,6 @@
package org.eclipse.jgit.lib;
-import static java.lang.Integer.valueOf;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.eclipse.jgit.junit.JGitTestUtil.concat;
import static org.eclipse.jgit.lib.Constants.OBJECT_ID_LENGTH;
@@ -92,7 +91,7 @@ public class ObjectCheckerTest {
public void testInvalidType() {
String msg = MessageFormat.format(
JGitText.get().corruptObjectInvalidType2,
- valueOf(OBJ_BAD));
+ Integer.valueOf(OBJ_BAD));
assertCorrupt(msg, OBJ_BAD, new byte[0]);
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java
index 71bda46ee5..8335c07b1f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java
@@ -10,7 +10,6 @@
package org.eclipse.jgit.patch;
-import static java.lang.Integer.valueOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@@ -35,7 +34,7 @@ public class PatchCcErrorTest {
assertSame(FormatError.Severity.ERROR, e.getSeverity());
assertEquals(MessageFormat.format(
JGitText.get().truncatedHunkLinesMissingForAncestor,
- valueOf(1), valueOf(1)), e.getMessage());
+ Integer.valueOf(1), Integer.valueOf(1)), e.getMessage());
assertEquals(346, e.getOffset());
assertTrue(e.getLineText().startsWith(
"@@@ -55,12 -163,13 +163,15 @@@ public "));
@@ -45,7 +44,7 @@ public class PatchCcErrorTest {
assertSame(FormatError.Severity.ERROR, e.getSeverity());
assertEquals(MessageFormat.format(
JGitText.get().truncatedHunkLinesMissingForAncestor,
- valueOf(2), valueOf(2)), e.getMessage());
+ Integer.valueOf(2), Integer.valueOf(2)), e.getMessage());
assertEquals(346, e.getOffset());
assertTrue(e.getLineText().startsWith(
"@@@ -55,12 -163,13 +163,15 @@@ public "));
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java
index 3516ed01fc..444e958ae8 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java
@@ -10,7 +10,6 @@
package org.eclipse.jgit.transport;
-import static java.lang.Integer.valueOf;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.eclipse.jgit.transport.SideBandOutputStream.CH_DATA;
import static org.eclipse.jgit.transport.SideBandOutputStream.CH_ERROR;
@@ -224,7 +223,8 @@ public class SideBandOutputStreamTest {
} catch (IllegalArgumentException e) {
assertEquals(MessageFormat.format(
JGitText.get().packetSizeMustBeAtMost,
- valueOf(Integer.MAX_VALUE), valueOf(65520)), e.getMessage());
+ Integer.valueOf(Integer.MAX_VALUE), Integer.valueOf(65520)),
+ e.getMessage());
}
}