From fea6e2e6d0e9b221616207ae875fa74fb5e4492b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Tue, 26 Nov 2013 21:03:24 +0100 Subject: [PATCH] use replace instead of replaceAll because they are fixed conditions --- .../com/google/gwt/query/rebind/JsniBundleGenerator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java index 7c9ab708..95a13e12 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java @@ -216,7 +216,7 @@ public class JsniBundleGenerator extends Generator { if (!isCPPComment && !isCComment && !isRegex && !isOper) { isCPPComment = c == '/'; isCComment = c == '*'; - isOper = !isCPPComment && !isCComment && !"=()&|\n;,\\}".contains(""+prev); + isOper = !isCPPComment && !isCComment && !"=(&|?:\n},".contains(""+prev); isRegex = !isCPPComment && !isCComment && !isOper; } if (isOper) { @@ -258,12 +258,12 @@ public class JsniBundleGenerator extends Generator { } private String escapeQuotedString(String s, Character quote) { - return quote + s.replaceAll("\\*/", "*" + quote + " + " + quote + "/") + quote; + return quote + s.replace("*/", "*" + quote + " + " + quote + "/") + quote; } private String escapeInlineRegex(String s, String mod) { if (s.endsWith("*")) { - return "new RegExp('" + s.replaceAll("\\", "\\\\") + "','" + mod + "')"; + return "new RegExp('" + s.replace("\\", "\\\\") + "','" + mod + "')"; } else { return '/' + s + '/' + mod; } -- 2.39.5