This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0edf16c669ab13e2fc785556775153c7dd7c5b85 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sat Oct 17 17:36:58 2020 +0200 Fixed CS --- .../camel/language/joor/JoorCompilationException.java | 4 ++-- .../org/apache/camel/language/joor/JoorExpression.java | 8 ++++---- .../language/joor/JoorExpressionEvaluationException.java | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorCompilationException.java b/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorCompilationException.java index c0184c6..348c728 100644 --- a/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorCompilationException.java +++ b/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorCompilationException.java @@ -18,8 +18,8 @@ package org.apache.camel.language.joor; public class JoorCompilationException extends RuntimeException { - private String className; - private String code; + private final String className; + private final String code; public JoorCompilationException(String className, String code, Throwable cause) { super("jOOR compilation error for class: " + className + " with code:\n" + code, cause); diff --git a/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorExpression.java b/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorExpression.java index c024c23..62dcaf9 100644 --- a/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorExpression.java +++ b/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorExpression.java @@ -32,7 +32,7 @@ public class JoorExpression extends ExpressionAdapter { private static final AtomicInteger COUNTER = new AtomicInteger(); private static final Logger LOG = LoggerFactory.getLogger(JoorExpression.class); - private static Boolean JAVA8; + private static Boolean java8; private final String text; private String className; @@ -105,9 +105,9 @@ public class JoorExpression extends ExpressionAdapter { public void init(CamelContext context) { super.init(context); - if (JAVA8 == null) { - JAVA8 = getJavaMajorVersion() == 8; - if (JAVA8) { + if (java8 == null) { + java8 = getJavaMajorVersion() == 8; + if (java8) { throw new UnsupportedOperationException("Java 8 is not supported. Use Java 11 or higher"); } } diff --git a/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorExpressionEvaluationException.java b/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorExpressionEvaluationException.java index 93ecf59..806e550 100644 --- a/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorExpressionEvaluationException.java +++ b/components/camel-joor/src/main/java/org/apache/camel/language/joor/JoorExpressionEvaluationException.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.camel.language.joor; import org.apache.camel.Exchange;