@Test void shouldThrow() { GroovyExpressionMatcher matcher = new GroovyExpressionMatcher(EXCEPTION_PARSER_SCRIPT); assertThat(matcher.run(null, new IssueBuilder(), 0, FILE_NAME)).isEqualTo(Optional.empty()); }
public Object run(final Matcher matcher, final IssueBuilder builder, final int lineNumber, final String fileName) { if (compileScriptIfNotYetDone()) { Binding binding = compiled.getBinding(); binding.setVariable("matcher", matcher); binding.setVariable("builder", builder); binding.setVariable("lineNumber", lineNumber); binding.setVariable("fileName", fileName); return runScript(); } return Optional.empty(); }
GroovyExpressionMatcher implements Serializable { public Object run(final Matcher matcher, final IssueBuilder builder, final int lineNumber, final String fileName) { if (compileScriptIfNotYetDone()) { Binding binding = compiled.getBinding(); binding.setVariable("matcher", matcher); binding.setVariable("builder", builder); binding.setVariable("lineNumber", lineNumber); binding.setVariable("fileName", fileName); return runScript(); } return Optional.empty(); } }
GroovyExpressionMatcher implements Serializable { public Object run(final Matcher matcher, final IssueBuilder builder, final int lineNumber, final String fileName) { if (compileScriptIfNotYetDone()) { Binding binding = compiled.getBinding(); binding.setVariable("matcher", matcher); binding.setVariable("builder", builder); binding.setVariable("lineNumber", lineNumber); binding.setVariable("fileName", fileName); return runScript(); } return Optional.empty(); } GroovyExpressionMatcher(final String script); }
GroovyExpressionMatcher implements Serializable { public Object run(final Matcher matcher, final IssueBuilder builder, final int lineNumber, final String fileName) { if (compileScriptIfNotYetDone()) { Binding binding = compiled.getBinding(); binding.setVariable("matcher", matcher); binding.setVariable("builder", builder); binding.setVariable("lineNumber", lineNumber); binding.setVariable("fileName", fileName); return runScript(); } return Optional.empty(); } GroovyExpressionMatcher(final String script); Script compile(); @SuppressWarnings("all") Optional<Issue> createIssue(final Matcher matcher, final IssueBuilder builder, final int lineNumber,
            final String fileName); Object run(final Matcher matcher, final IssueBuilder builder, final int lineNumber, final String fileName); }
GroovyExpressionMatcher implements Serializable { public Object run(final Matcher matcher, final IssueBuilder builder, final int lineNumber, final String fileName) { if (compileScriptIfNotYetDone()) { Binding binding = compiled.getBinding(); binding.setVariable("matcher", matcher); binding.setVariable("builder", builder); binding.setVariable("lineNumber", lineNumber); binding.setVariable("fileName", fileName); return runScript(); } return Optional.empty(); } GroovyExpressionMatcher(final String script); Script compile(); @SuppressWarnings("all") Optional<Issue> createIssue(final Matcher matcher, final IssueBuilder builder, final int lineNumber,
            final String fileName); Object run(final Matcher matcher, final IssueBuilder builder, final int lineNumber, final String fileName);  }