This is an automated email from the ASF dual-hosted git repository. bvahdat pushed a commit to branch maven-checkstyle-upgrade-and-violation-fixes in repository https://gitbox.apache.org/repos/asf/camel.git
commit f7b32e68a6f4b21790199a2bb89b1bffd505141a Author: Otavio Rodolfo Piske <orpi...@users.noreply.github.com> AuthorDate: Mon Jun 21 15:31:32 2021 +0200 (chores) Formatting fixes (#5723) components: camel-ldap, camel-ldif, camel-lucene --- .../org/apache/camel/component/lucene/LuceneConfiguration.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java index 8437e6b..bc473aa 100644 --- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java @@ -88,16 +88,18 @@ public class LuceneConfiguration { } private boolean isValidAuthority() throws URISyntaxException { - if (!authority.contains(":") - || authority.split(":")[0] == null - || !authority.split(":")[1].equalsIgnoreCase("insert") - && !authority.split(":")[1].equalsIgnoreCase("query")) { + if (!authority.contains(":") || authority.split(":")[0] == null || insertOrQueryCheck()) { return false; } return true; } + private boolean insertOrQueryCheck() { + return !authority.split(":")[1].equalsIgnoreCase("insert") + && !authority.split(":")[1].equalsIgnoreCase("query"); + } + private String retrieveTokenFromAuthority(String token) throws URISyntaxException { String retval;