Skip to content

Commit

Permalink
avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
klaus-sap authored Feb 26, 2024
1 parent 05dc2c0 commit 1710649
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package org.cloudfoundry.identity.uaa.logging;

import javax.annotation.Nullable;

public class LogSanitizerUtil {

public static final String SANITIZED_FLAG = "[SANITIZED]";

@Nullable
public static String sanitize(String original) {
if (original == null) return original;

String cleaned = original.replace("\r","|")
.replace("\n","|")
.replace("\t","|");
Expand All @@ -16,5 +21,4 @@ public static String sanitize(String original) {
return cleaned;
}


}

0 comments on commit 1710649

Please sign in to comment.