Skip to content

Commit

Permalink
0003334: Triggers get created on similarly named schemas (schemas with
Browse files Browse the repository at this point in the history
extension of each other) in Oracle database
  • Loading branch information
klementinastojanovska committed Jan 2, 2018
1 parent c5d2c5a commit efa78ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -182,8 +182,10 @@ public static boolean isWildCardMatch(String text, String pattern) {
String card = cards[i];

boolean foundToken = false;
if (i == 0 && !pattern.startsWith("*")) {
if (i == 0 && !pattern.startsWith("*") && pattern.endsWith("*")) {
foundToken = text.startsWith(card);
} else if (i == 0 && !pattern.startsWith("*")) {
foundToken = text.equals(card);
} else {
foundToken = text.indexOf(card) != -1;
}
Expand Down
Expand Up @@ -56,6 +56,7 @@ public void testIsWildcardMatch() {
assertFalse(FormatUtils.isWildCardMatch("NOT_A_MATCH", "TEST_*"));
assertFalse(FormatUtils.isWildCardMatch("NOT_A_MATCH_TEST_1", "TEST_*"));
assertTrue(FormatUtils.isWildCardMatch("NOT_A_MATCH_TEST_1", "*TEST*"));
assertFalse(FormatUtils.isWildCardMatch("TEST_12", "TEST_1"));
assertFalse(FormatUtils.isWildCardMatch("B_A", "*A*B"));
assertTrue(FormatUtils.isWildCardMatch("A_B", "*A*B"));
assertFalse(FormatUtils.isWildCardMatch("TEST_NO_MATCH", "TEST_*,!TEST_NO_MATCH"));
Expand Down

0 comments on commit efa78ec

Please sign in to comment.