Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions libs/grok/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

dependencies {
compile 'org.jruby.joni:joni:2.1.6'
compile 'org.jruby.joni:joni:2.1.29'
// joni dependencies:
compile 'org.jruby.jcodings:jcodings:1.0.44'

Expand All @@ -45,10 +45,3 @@ if (isEclipse) {
}
}
}

thirdPartyAudit.ignoreMissingClasses (
// joni has AsmCompilerSupport, but that isn't being used:
'org.objectweb.asm.ClassWriter',
'org.objectweb.asm.MethodVisitor',
'org.objectweb.asm.Opcodes'
)
1 change: 1 addition & 0 deletions libs/grok/licenses/joni-2.1.29.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3cb751702e1194ff24259155db4d37e9383d4320
1 change: 0 additions & 1 deletion libs/grok/licenses/joni-2.1.6.jar.sha1

This file was deleted.

12 changes: 9 additions & 3 deletions libs/grok/src/main/java/org/elasticsearch/grok/Grok.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ public String toRegex(String grokPattern) {
int result;
try {
threadWatchdog.register();
result = matcher.search(0, grokPatternBytes.length, Option.NONE);
result = matcher.searchInterruptible(0, grokPatternBytes.length, Option.NONE);
} catch (InterruptedException e) {
result = Matcher.INTERRUPTED;
} finally {
threadWatchdog.unregister();
}
Expand Down Expand Up @@ -224,7 +226,9 @@ public boolean match(String text) {
int result;
try {
threadWatchdog.register();
result = matcher.search(0, text.length(), Option.DEFAULT);
result = matcher.searchInterruptible(0, text.length(), Option.DEFAULT);
} catch (InterruptedException e) {
result = Matcher.INTERRUPTED;
} finally {
threadWatchdog.unregister();
}
Expand All @@ -244,7 +248,9 @@ public Map<String, Object> captures(String text) {
int result;
try {
threadWatchdog.register();
result = matcher.search(0, textAsBytes.length, Option.DEFAULT);
result = matcher.searchInterruptible(0, textAsBytes.length, Option.DEFAULT);
} catch (InterruptedException e) {
result = Matcher.INTERRUPTED;
} finally {
threadWatchdog.unregister();
}
Expand Down