File tree Expand file tree Collapse file tree
dd-java-agent/agent-crashtracking/src/main/java/datadog/crashtracking/parsers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package datadog .crashtracking .parsers ;
22
3+ import de .thetaphi .forbiddenapis .SuppressForbidden ;
34import java .util .function .Function ;
45import java .util .regex .Matcher ;
56import java .util .regex .Pattern ;
@@ -69,6 +70,7 @@ private RedactUtils() {}
6970 * Main entry point: redact sensitive data from a register-to-memory mapping value (possibly
7071 * multiline).
7172 */
73+ @ SuppressForbidden // split on single-character uses a fast path without regex
7274 public static String redactRegisterToMemoryMapping (String value ) {
7375 if (value == null || value .isEmpty ()) return value ;
7476 String [] lines = value .split ("\n " , -1 );
@@ -241,6 +243,7 @@ private static String redactClassName(char sep, String className) {
241243 * Redacts all path segments except the parent directory and filename. <code>/path/to/dir/lib.so
242244 * </code> to <code>/redacted/redacted/dir/lib.so</code>
243245 */
246+ @ SuppressForbidden // split on single-character uses a fast path without regex
244247 static String redactPath (String path ) {
245248 String [] parts = path .split ("/" , -1 );
246249 // parts[0] is always "" (before the leading slash)
You can’t perform that action at this time.
0 commit comments