YARN-8918. [Submarine] Correct method usage of str.subString in CliUtils. (Zhankun Tang via wangda)

Change-Id: Id1f11dbab3aa838dee3a0ec8b8fd5dc32f5dd946
This commit is contained in:
Wangda Tan 2018-11-13 11:24:15 -08:00
parent 671fd6524b
commit 076b795b2e
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class CliUtils {
resourcesStr = resourcesStr.substring(1); resourcesStr = resourcesStr.substring(1);
} }
if (resourcesStr.endsWith("]")) { if (resourcesStr.endsWith("]")) {
resourcesStr = resourcesStr.substring(0, resourcesStr.length()); resourcesStr = resourcesStr.substring(0, resourcesStr.length() - 1);
} }
for (String resource : resourcesStr.trim().split(",")) { for (String resource : resourcesStr.trim().split(",")) {