From 0db509f7e750336923fcee858a7152129dc1a321 Mon Sep 17 00:00:00 2001 From: Carsten Hammer Date: Sat, 6 Apr 2019 19:38:27 +0200 Subject: Use String.isEmpty() instead of comparing to "" Use of String.equals("") can be replaced with with String.length() == 0 (for JDK5 and lower) or String.isEmpty() (for JDK6 and higher) Change-Id: Id1462d22c5d249485d87993263a9239809e73c55 Signed-off-by: Carsten Hammer Signed-off-by: David Pursehouse --- .../src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'org.eclipse.jgit.pgm.test/src/org') diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java index 0d1894b644..a830ff2849 100644 --- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java +++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java @@ -214,7 +214,7 @@ public class CLIRepositoryTestCase extends LocalDiskRepositoryTestCase { protected void assertStringArrayEquals(String expected, String[] actual) { // if there is more than one line, ignore last one if empty assertEquals(1, - actual.length > 1 && actual[actual.length - 1].equals("") + actual.length > 1 && actual[actual.length - 1].isEmpty() ? actual.length - 1 : actual.length); assertEquals(expected, actual[0]); } -- cgit v1.2.3