From c4143db48992255b1b90c6f183b3b72904eaf36c Mon Sep 17 00:00:00 2001 From: Chris Larsen Date: Mon, 19 Sep 2022 18:21:02 -0700 Subject: [PATCH] make `PatternUtils.escape` public (#994) Can be useful for more precisely mapping fixed strings to a regex pattern. --- .../java/com/netflix/spectator/impl/matcher/PatternUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spectator-api/src/main/java/com/netflix/spectator/impl/matcher/PatternUtils.java b/spectator-api/src/main/java/com/netflix/spectator/impl/matcher/PatternUtils.java index 8d8557837..420ae569c 100644 --- a/spectator-api/src/main/java/com/netflix/spectator/impl/matcher/PatternUtils.java +++ b/spectator-api/src/main/java/com/netflix/spectator/impl/matcher/PatternUtils.java @@ -160,7 +160,7 @@ static String expandEscapedChars(String str) { * as a regular expression. */ @SuppressWarnings("PMD.NcssCount") - static String escape(String str) { + public static String escape(String str) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < str.length(); ++i) { char c = str.charAt(i);