commit | 49cbd3f8f3e3e4f089b00665819eec791e8732bb | [log] [tgz] |
---|---|---|
author | Aaron Holden <aaronholden@google.com> | Mon Oct 21 11:22:21 2019 -0700 |
committer | Aaron Holden <aaronholden@google.com> | Mon Oct 21 11:22:21 2019 -0700 |
tree | a5ba1e5d418a3083eedf3bab5e00117b50f35520 | |
parent | d4b94862b7e96b8f0ef45d9f05d86c825c24ddc7 [diff] |
Don't modify BL args list during logging bug: 142360522 bug: 141768186 Test: none Change-Id: I913a457d736b5b312b3845e9d0af4a12351e0c48
diff --git a/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java b/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java index c214329..34f98d7 100644 --- a/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java +++ b/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java
@@ -98,10 +98,11 @@ /** Substitute sensitive information with REDACTED_PLACEHOLDER if necessary. */ protected static String[] formatArgs(String[] args) { - for (int i = 0; i < args.length; i++) { - args[i] = formatArg(args[i]); + List<String> formattedArgs = new ArrayList<>(); + for (String arg : args) { + formattedArgs.add(formatArg(arg)); } - return args; + return formattedArgs.toArray(new String[0]); } private static String formatArg(String arg) {