forked from apache/incubator-kie-drools
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance test/grammar coverage. function import, global, exists, not (#6)
- Loading branch information
1 parent
919cb1a
commit a6cc3aa
Showing
9 changed files
with
462 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
drools-drl/drools-drl10-parser/src/main/java/org/drools/parser/StringUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.drools.parser; | ||
|
||
/** | ||
* will be merged in drools-util | ||
*/ | ||
public class StringUtils { | ||
|
||
private StringUtils() { | ||
} | ||
|
||
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; | ||
} | ||
} |
Oops, something went wrong.