yurloc commented on code in PR #5797:
URL:
https://github.com/apache/incubator-kie-drools/pull/5797#discussion_r1533053227
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/util/ParserStringUtils.java:
##########
@@ -27,6 +27,31 @@ private ParserStringUtils() {
// Private constructor to prevent instantiation.
}
+ /**
+ * Strip string delimiters (e.g. "foo" -> foo)
+ */
+ public static String safeStripStringDelimiters(String value) {
+ if (value != null) {
+ value = value.trim();
+ if (value.length() >= 2 && value.startsWith("\"") &&
value.endsWith("\"")) {
+ value = value.substring(1, value.length() - 1);
+ }
+ }
+ return value;
+ }
Review Comment:
This one is used by both the old parser and the new parser's visitor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]