diff options
author | Ivan Frade <ifrade@google.com> | 2024-07-08 14:21:45 -0700 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2024-10-30 23:00:15 +0000 |
commit | c8b1b822a409167b63bd9be11efac0bcd5476a5c (patch) | |
tree | 1df98f9074e561a1dbcad39e3afcc412463d26d3 /org.eclipse.jgit.junit/src/org/eclipse/jgit/junit | |
parent | d861ad1f5a1fdaf49b9c4b641e7d298b7acea6ad (diff) | |
download | jgit-c8b1b822a409167b63bd9be11efac0bcd5476a5c.tar.gz jgit-c8b1b822a409167b63bd9be11efac0bcd5476a5c.zip |
[errorprone] SeparateClassloadertTestRunner: use #split(String,int)
Errorprone recommends to use String.split(String, int) as it has a
less surprising behaviour with empty entries.
https://errorprone.info/bugpattern/StringSplitter
Change-Id: I48a01ee18d66bbb4a177aee576629dc5132d4a38
Diffstat (limited to 'org.eclipse.jgit.junit/src/org/eclipse/jgit/junit')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/SeparateClassloaderTestRunner.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/SeparateClassloaderTestRunner.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/SeparateClassloaderTestRunner.java index c8c56b21b8..2a482df04a 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/SeparateClassloaderTestRunner.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/SeparateClassloaderTestRunner.java @@ -44,7 +44,7 @@ public class SeparateClassloaderTestRunner extends BlockJUnit4ClassRunner { try { String pathSeparator = System.getProperty("path.separator"); String[] classPathEntries = System.getProperty("java.class.path") - .split(pathSeparator); + .split(pathSeparator, -1); URL[] urls = new URL[classPathEntries.length]; for (int i = 0; i < classPathEntries.length; i++) { urls[i] = Paths.get(classPathEntries[i]).toUri().toURL(); |