Skip to content

Commit 6189a8e

Browse files
authored
Use trim() method returned value.
Strings being immutable, you need to use the trim() method return value.
1 parent 607c20c commit 6189a8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestStorageRestore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public void testDfsAdminCmd() throws Exception {
294294
restore = fsi.getStorage().getRestoreFailedStorage();
295295
assertTrue("After check call restore is " + restore, restore);
296296
String commandOutput = cmdResult.getCommandOutput();
297-
commandOutput.trim();
297+
commandOutput = commandOutput.trim();
298298
assertTrue(commandOutput.contains("restoreFailedStorage is set to true"));
299299

300300

0 commit comments

Comments
 (0)