Skip to content

Commit

Permalink
Escape slashes following openrewrite/rewrite-templating#39 (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Dec 16, 2023
1 parent 5b2cb71 commit a628585
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void bar(String in, CharSequence cs) {
string = in == null || in.isEmpty() ? in : Character.toTitleCase(in.charAt(0)) + in.substring(1);
string = Objects.toString(in, "");
string = Objects.toString(in, "nil");
string = in.replaceAll("\\s+", "");
string = in.replaceAll("\\\\s+", "");
bool = in == null ? false : in.equalsIgnoreCase("other");
bool = Objects.equals(in, "other");
Expand All @@ -97,7 +97,7 @@ void bar(String in, CharSequence cs) {
string = in == null ? null : in.toLowerCase();
string = in == null || in.isEmpty() ? in : in.replace("search", "replacement");
string = in == null ? null : new StringBuffer(in).reverse().toString();
array = in.split("\\s+");
array = in.split("\\\\s+");
string = in == null ? null : in.trim();
string = in == null ? null : in.trim();
string = in == null ? null : in.toUpperCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void bar(String in, CharSequence cs) {
string = in == null || in.isEmpty() ? in : Character.toTitleCase(in.charAt(0)) + in.substring(1);
string = Objects.toString(in, "");
string = Objects.toString(in, "nil");
string = in.replaceAll("\\s+", "");
string = in.replaceAll("\\\\s+", "");
bool = in == null ? false : in.equalsIgnoreCase("other");
bool = Objects.equals(in, "other");
Expand All @@ -103,7 +103,7 @@ void bar(String in, CharSequence cs) {
string = in == null ? null : in.toLowerCase();
string = in == null || in.isEmpty() ? in : in.replace("search", "replacement");
string = in == null ? null : new StringBuilder(in).reverse().toString();
array = in.split("\\s+");
array = in.split("\\\\s+");
string = in == null ? null : in.trim();
string = in == null ? null : in.trim();
string = in == null ? null : in.toUpperCase();
Expand Down

0 comments on commit a628585

Please sign in to comment.