You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2018/04/18 14:56:14 UTC

[camel] 06/06: polish

This is an automated email from the ASF dual-hosted git repository.

bvahdat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5ebd2f11c25a36bb3ed6d6b556ae3bb96a23aa0a
Author: Babak Vahdat <bv...@apache.org>
AuthorDate: Wed Apr 18 16:55:36 2018 +0200

    polish
---
 .../perf/XPathBasedRoutingPerformanceTest.java     |  2 +-
 .../perf/XQueryBasedRoutingPerformanceTest.java    |  2 +-
 .../AbstractBaseEsbPerformanceIntegrationTest.java |  2 +-
 .../apache/camel/test/perf/esb/EchoService.java    |  2 +-
 .../camel/parser/helper/CamelJavaParserHelper.java | 11 ++-
 .../parser/helper/CamelJavaTreeParserHelper.java   |  1 -
 .../camel/parser/helper/XmlLineNumberParser.java   |  2 +-
 .../parser/java/RoasterSimpleProcessorTest.java    |  2 +-
 .../java/org/apache/camel/maven/EmbeddedMojo.java  |  2 +-
 .../org/apache/camel/maven/RouteCoverageMojo.java  |  4 +-
 .../main/java/org/apache/camel/maven/RunMojo.java  | 18 ++---
 .../java/org/apache/camel/maven/ValidateMojo.java  |  4 +-
 .../packaging/PackageArchetypeCatalogMojo.java     |  4 +-
 .../maven/packaging/PackageDataFormatMojo.java     |  2 +-
 .../camel/maven/packaging/PackageHelper.java       |  2 +-
 .../camel/maven/packaging/PackageLanguageMojo.java |  2 +-
 .../camel/maven/packaging/PackageModelMojo.java    |  4 +-
 .../maven/packaging/PrepareCatalogKarafMojo.java   | 26 ++++---
 .../camel/maven/packaging/PrepareCatalogMojo.java  | 84 +++++++++++-----------
 .../packaging/PrepareCatalogSpringBootMojo.java    | 24 +++----
 .../packaging/SpringBootAutoConfigurationMojo.java | 12 ++--
 .../camel/maven/packaging/UpdateReadmeMojo.java    | 14 ++--
 .../maven/packaging/ValidateComponentMojo.java     |  2 +-
 .../maven/packaging/model/ComponentModel.java      |  6 +-
 .../maven/packaging/model/DataFormatModel.java     |  2 +-
 .../camel/maven/packaging/model/EipModel.java      |  2 +-
 .../camel/maven/packaging/model/LanguageModel.java |  2 +-
 .../org/apache/camel/guice/maven/EmbeddedMojo.java |  2 +-
 .../java/org/apache/camel/guice/maven/RunMojo.java | 16 ++---
 29 files changed, 126 insertions(+), 132 deletions(-)

diff --git a/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XPathBasedRoutingPerformanceTest.java b/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XPathBasedRoutingPerformanceTest.java
index a290738..9b517a0 100644
--- a/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XPathBasedRoutingPerformanceTest.java
+++ b/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XPathBasedRoutingPerformanceTest.java
@@ -63,7 +63,7 @@ public class XPathBasedRoutingPerformanceTest extends AbstractBasePerformanceTes
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                Map<String, String> namespaces = new HashMap<String, String>();
+                Map<String, String> namespaces = new HashMap<>();
                 namespaces.put("soapenv", "http://schemas.xmlsoap.org/soap/envelope/");
                 namespaces.put("m", "http://services.samples/xsd");
 
diff --git a/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XQueryBasedRoutingPerformanceTest.java b/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XQueryBasedRoutingPerformanceTest.java
index 684ef28..d2f9be9 100644
--- a/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XQueryBasedRoutingPerformanceTest.java
+++ b/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XQueryBasedRoutingPerformanceTest.java
@@ -63,7 +63,7 @@ public class XQueryBasedRoutingPerformanceTest extends AbstractBasePerformanceTe
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                Map<String, String> namespaces = new HashMap<String, String>();
+                Map<String, String> namespaces = new HashMap<>();
                 namespaces.put("soapenv", "http://schemas.xmlsoap.org/soap/envelope/");
                 namespaces.put("m", "http://services.samples/xsd");
 
diff --git a/tests/camel-performance/src/test/java/org/apache/camel/test/perf/esb/AbstractBaseEsbPerformanceIntegrationTest.java b/tests/camel-performance/src/test/java/org/apache/camel/test/perf/esb/AbstractBaseEsbPerformanceIntegrationTest.java
index 940837e..af393da 100644
--- a/tests/camel-performance/src/test/java/org/apache/camel/test/perf/esb/AbstractBaseEsbPerformanceIntegrationTest.java
+++ b/tests/camel-performance/src/test/java/org/apache/camel/test/perf/esb/AbstractBaseEsbPerformanceIntegrationTest.java
@@ -71,7 +71,7 @@ public abstract class AbstractBaseEsbPerformanceIntegrationTest extends CamelBlu
     protected void send(String endpointUri, int messagesToSend) {
         template.setDefaultEndpointUri(endpointUri);
 
-        Map<String, Object> headers = new HashMap<String, Object>();
+        Map<String, Object> headers = new HashMap<>();
         headers.put("Content-Type", "text/xml;charset=UTF-8");
         headers.put("SOAPAction", "urn:buyStocks.2");
         headers.put("routing", "xadmin;server1;community#1.0##");
diff --git a/tests/camel-performance/src/test/java/org/apache/camel/test/perf/esb/EchoService.java b/tests/camel-performance/src/test/java/org/apache/camel/test/perf/esb/EchoService.java
index 05fe4d0..9841fcf 100644
--- a/tests/camel-performance/src/test/java/org/apache/camel/test/perf/esb/EchoService.java
+++ b/tests/camel-performance/src/test/java/org/apache/camel/test/perf/esb/EchoService.java
@@ -68,7 +68,7 @@ public class EchoService extends HttpServlet {
                 if (tot >= bb.capacity()) {
                     // --- auto expand logic ---
                     if (bbList == null) {
-                        bbList = new ArrayList<ByteBuffer>();
+                        bbList = new ArrayList<>();
                     }
                     bb.flip();
                     bbList.add(bb);
diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
index ef75a96..95338cf 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
@@ -19,7 +19,6 @@ package org.apache.camel.parser.helper;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.stream.Collectors;
 
 import org.apache.camel.parser.ParserResult;
 import org.apache.camel.parser.RouteBuilderParser;
@@ -33,8 +32,6 @@ import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.ClassInstanceCrea
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.Expression;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.ExpressionStatement;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.FieldDeclaration;
-import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.IAnnotationBinding;
-import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.ITypeBinding;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.InfixExpression;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.MemberValuePair;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.MethodDeclaration;
@@ -183,7 +180,7 @@ public final class CamelJavaParserHelper {
     private static List<ParserResult> doParseCamelUris(MethodSource<JavaClassSource> method, boolean consumers, boolean producers,
                                                        boolean strings, boolean fields, boolean routeIdsOnly) {
 
-        List<ParserResult> answer = new ArrayList<ParserResult>();
+        List<ParserResult> answer = new ArrayList<>();
 
         if (method != null) {
             MethodDeclaration md = (MethodDeclaration) method.getInternal();
@@ -195,7 +192,7 @@ public final class CamelJavaParserHelper {
                         ExpressionStatement es = (ExpressionStatement) statement;
                         Expression exp = es.getExpression();
 
-                        List<ParserResult> uris = new ArrayList<ParserResult>();
+                        List<ParserResult> uris = new ArrayList<>();
                         parseExpression(method.getOrigin(), block, exp, uris, consumers, producers, strings, fields, routeIdsOnly);
                         if (!uris.isEmpty()) {
                             // reverse the order as we will grab them from last->first
@@ -407,7 +404,7 @@ public final class CamelJavaParserHelper {
     }
 
     public static List<ParserResult> parseCamelSimpleExpressions(MethodSource<JavaClassSource> method) {
-        List<ParserResult> answer = new ArrayList<ParserResult>();
+        List<ParserResult> answer = new ArrayList<>();
 
         MethodDeclaration md = (MethodDeclaration) method.getInternal();
         Block block = md.getBody();
@@ -418,7 +415,7 @@ public final class CamelJavaParserHelper {
                     ExpressionStatement es = (ExpressionStatement) statement;
                     Expression exp = es.getExpression();
 
-                    List<ParserResult> expressions = new ArrayList<ParserResult>();
+                    List<ParserResult> expressions = new ArrayList<>();
                     parseExpression(null, method.getOrigin(), block, exp, expressions);
                     if (!expressions.isEmpty()) {
                         // reverse the order as we will grab them from last->first
diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaTreeParserHelper.java b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaTreeParserHelper.java
index 3d2ff1b..561fa1a 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaTreeParserHelper.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaTreeParserHelper.java
@@ -36,7 +36,6 @@ import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.BooleanLiteral;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.Expression;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.ExpressionStatement;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.FieldDeclaration;
-import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.ITypeBinding;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.InfixExpression;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.MemberValuePair;
 import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.MethodDeclaration;
diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java
index b214b1e..35eae1c 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java
@@ -94,7 +94,7 @@ public final class XmlLineNumberParser {
         final DocumentBuilder docBuilder = dbf.newDocumentBuilder();
         doc = docBuilder.newDocument();
 
-        final Stack<Element> elementStack = new Stack<Element>();
+        final Stack<Element> elementStack = new Stack<>();
         final StringBuilder textBuffer = new StringBuilder();
         final DefaultHandler handler = new DefaultHandler() {
             private Locator locator;
diff --git a/tooling/camel-route-parser/src/test/java/org/apache/camel/parser/java/RoasterSimpleProcessorTest.java b/tooling/camel-route-parser/src/test/java/org/apache/camel/parser/java/RoasterSimpleProcessorTest.java
index c83d89a..dee505f 100644
--- a/tooling/camel-route-parser/src/test/java/org/apache/camel/parser/java/RoasterSimpleProcessorTest.java
+++ b/tooling/camel-route-parser/src/test/java/org/apache/camel/parser/java/RoasterSimpleProcessorTest.java
@@ -41,7 +41,7 @@ public class RoasterSimpleProcessorTest {
         JavaClassSource clazz = (JavaClassSource) Roaster.parse(new File("src/test/java/org/apache/camel/parser/java/SimpleProcessorTest.java"));
         MethodSource<JavaClassSource> method = CamelJavaParserHelper.findConfigureMethod(clazz);
 
-        List<CamelEndpointDetails> details = new ArrayList<CamelEndpointDetails>();
+        List<CamelEndpointDetails> details = new ArrayList<>();
         RouteBuilderParser.parseRouteBuilderEndpoints(clazz, ".", "src/test/java/org/apache/camel/parser/java/SimpleProcessorTest.java", details);
         LOG.info("{}", details);
 
diff --git a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java
index 3a9970a..3d775e1 100644
--- a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java
+++ b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/EmbeddedMojo.java
@@ -171,7 +171,7 @@ public class EmbeddedMojo extends AbstractExecMojo {
 
     protected String[] createArguments() {
 
-        List<String> args = new ArrayList<String>(5);
+        List<String> args = new ArrayList<>(5);
 
         if (applicationContextUri != null) {
             args.add("-applicationContext");
diff --git a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
index 6630a08..aca847b 100644
--- a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
+++ b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
@@ -114,8 +114,8 @@ public class RouteCoverageMojo extends AbstractExecMojo {
     @Override
     public void execute() throws MojoExecutionException, MojoFailureException {
 
-        Set<File> javaFiles = new LinkedHashSet<File>();
-        Set<File> xmlFiles = new LinkedHashSet<File>();
+        Set<File> javaFiles = new LinkedHashSet<>();
+        Set<File> xmlFiles = new LinkedHashSet<>();
 
         // find all java route builder classes
         List list = project.getCompileSourceRoots();
diff --git a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
index b2c7508..164a8ff 100644
--- a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
+++ b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
@@ -415,7 +415,7 @@ public class RunMojo extends AbstractExecMojo {
         }
 
         // lets create the command line arguments to pass in...
-        List<String> args = new ArrayList<String>();
+        List<String> args = new ArrayList<>();
         if (trace) {
             args.add("-t");
         }
@@ -644,7 +644,7 @@ public class RunMojo extends AbstractExecMojo {
     @SuppressWarnings("deprecation")
     private void terminateThreads(ThreadGroup threadGroup) {
         long startTime = System.currentTimeMillis();
-        Set<Thread> uncooperativeThreads = new HashSet<Thread>(); // these were not responsive
+        Set<Thread> uncooperativeThreads = new HashSet<>(); // these were not responsive
         // to interruption
         for (Collection<Thread> threads = getActiveThreads(threadGroup); !threads.isEmpty(); threads = getActiveThreads(threadGroup), threads
             .removeAll(uncooperativeThreads)) {
@@ -708,7 +708,7 @@ public class RunMojo extends AbstractExecMojo {
     private Collection<Thread> getActiveThreads(ThreadGroup threadGroup) {
         Thread[] threads = new Thread[threadGroup.activeCount()];
         int numThreads = threadGroup.enumerate(threads);
-        Collection<Thread> result = new ArrayList<Thread>(numThreads);
+        Collection<Thread> result = new ArrayList<>(numThreads);
         for (int i = 0; i < threads.length && threads[i] != null; i++) {
             result.add(threads[i]);
         }
@@ -771,7 +771,7 @@ public class RunMojo extends AbstractExecMojo {
      * @throws MojoExecutionException
      */
     private ClassLoader getClassLoader() throws MojoExecutionException {
-        Set<URL> classpathURLs = new LinkedHashSet<URL>();
+        Set<URL> classpathURLs = new LinkedHashSet<>();
         // project classpath must be first
         this.addRelevantProjectDependenciesToClasspath(classpathURLs);
         // and extra plugin classpath
@@ -837,7 +837,7 @@ public class RunMojo extends AbstractExecMojo {
         }
 
         try {
-            Set<Artifact> artifacts = new HashSet<Artifact>(this.pluginDependencies);
+            Set<Artifact> artifacts = new HashSet<>(this.pluginDependencies);
             for (Artifact artifact : artifacts) {
                 // must
                 if (artifact.getArtifactId().equals(extraPluginDependencyArtifactId)
@@ -905,7 +905,7 @@ public class RunMojo extends AbstractExecMojo {
     }
 
     private Collection<Artifact> getAllNonTestScopedDependencies() throws MojoExecutionException {
-        List<Artifact> answer = new ArrayList<Artifact>();
+        List<Artifact> answer = new ArrayList<>();
 
         for (Artifact artifact : getAllDependencies()) {
 
@@ -919,7 +919,7 @@ public class RunMojo extends AbstractExecMojo {
 
     // generic method to retrieve all the transitive dependencies
     private Collection<Artifact> getAllDependencies() throws MojoExecutionException {
-        List<Artifact> artifacts = new ArrayList<Artifact>();
+        List<Artifact> artifacts = new ArrayList<>();
 
         for (Iterator<?> dependencies = project.getDependencies().iterator(); dependencies.hasNext();) {
             Dependency dependency = (Dependency)dependencies.next();
@@ -952,7 +952,7 @@ public class RunMojo extends AbstractExecMojo {
                 art.setFile(new File(dependency.getSystemPath()));
             }
 
-            List<String> exclusions = new ArrayList<String>();
+            List<String> exclusions = new ArrayList<>();
             for (Exclusion exclusion : dependency.getExclusions()) {
                 exclusions.add(exclusion.getGroupId() + ":" + exclusion.getArtifactId());
             }
@@ -980,7 +980,7 @@ public class RunMojo extends AbstractExecMojo {
         if (this.includePluginDependencies) {
             if (this.executableDependency == null) {
                 getLog().debug("All Plugin Dependencies will be included.");
-                relevantDependencies = new HashSet<Artifact>(this.pluginDependencies);
+                relevantDependencies = new HashSet<>(this.pluginDependencies);
             } else {
                 getLog().debug("Selected plugin Dependencies will be included.");
                 Artifact executableArtifact = this.findExecutableArtifact();
diff --git a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
index 8ba2883..27dae53 100644
--- a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
+++ b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
@@ -211,8 +211,8 @@ public class ValidateMojo extends AbstractExecMojo {
         List<CamelEndpointDetails> endpoints = new ArrayList<>();
         List<CamelSimpleExpressionDetails> simpleExpressions = new ArrayList<>();
         List<CamelRouteDetails> routeIds = new ArrayList<>();
-        Set<File> javaFiles = new LinkedHashSet<File>();
-        Set<File> xmlFiles = new LinkedHashSet<File>();
+        Set<File> javaFiles = new LinkedHashSet<>();
+        Set<File> xmlFiles = new LinkedHashSet<>();
 
         // find all java route builder classes
         if (includeJava) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageArchetypeCatalogMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageArchetypeCatalogMojo.java
index 5d92938..ad9aa96 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageArchetypeCatalogMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageArchetypeCatalogMojo.java
@@ -100,7 +100,7 @@ public class PackageArchetypeCatalogMojo extends AbstractMojo {
         });
 
 
-        List<ArchetypeModel> models = new ArrayList<ArchetypeModel>();
+        List<ArchetypeModel> models = new ArrayList<>();
 
         for (File dir : dirs) {
             File pom = new File(dir, "pom.xml");
@@ -192,7 +192,7 @@ public class PackageArchetypeCatalogMojo extends AbstractMojo {
                 if (projectHelper != null) {
                     log.info("Attaching archetype catalog to Maven project: " + project.getArtifactId());
 
-                    List<String> includes = new ArrayList<String>();
+                    List<String> includes = new ArrayList<>();
                     includes.add("archetype-catalog.xml");
                     projectHelper.addResource(project, outDir.getPath(), includes, new ArrayList<String>());
                     projectHelper.attachArtifact(project, "xml", "archetype-catalog", out);
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
index 8267a53..1818e7c 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
@@ -117,7 +117,7 @@ public class PackageDataFormatMojo extends AbstractMojo {
             return;
         }
 
-        Map<String, String> javaTypes = new HashMap<String, String>();
+        Map<String, String> javaTypes = new HashMap<>();
 
         StringBuilder buffer = new StringBuilder();
         int count = 0;
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageHelper.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageHelper.java
index 36418a0..3174f1b 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageHelper.java
@@ -109,7 +109,7 @@ public final class PackageHelper {
      * @return the map
      */
     public static Map<String, String> parseAsMap(String data) {
-        Map<String, String> answer = new HashMap<String, String>();
+        Map<String, String> answer = new HashMap<>();
         if (data != null) {
             String[] lines = data.split("\n");
             for (String line : lines) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
index 86c4005..d0e9086 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
@@ -117,7 +117,7 @@ public class PackageLanguageMojo extends AbstractMojo {
             return;
         }
 
-        Map<String, String> javaTypes = new HashMap<String, String>();
+        Map<String, String> javaTypes = new HashMap<>();
 
         StringBuilder buffer = new StringBuilder();
         int count = 0;
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageModelMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageModelMojo.java
index 685819a..7194470 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageModelMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageModelMojo.java
@@ -100,7 +100,7 @@ public class PackageModelMojo extends AbstractMojo {
         File camelMetaDir = new File(modelOutDir, "META-INF/services/org/apache/camel/");
         camelMetaDir.mkdirs();
 
-        Set<File> jsonFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
 
         // find all json files in camel-core
         if (buildDir != null && buildDir.isDirectory()) {
@@ -108,7 +108,7 @@ public class PackageModelMojo extends AbstractMojo {
             PackageHelper.findJsonFiles(target, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
         }
 
-        List<String> models = new ArrayList<String>();
+        List<String> models = new ArrayList<>();
         // sort the names
         for (File file : jsonFiles) {
             String name = file.getName();
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogKarafMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogKarafMojo.java
index 7aeaa714..9f9edb8 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogKarafMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogKarafMojo.java
@@ -139,8 +139,8 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
         getLog().info("Copying all Camel component json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> componentFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> componentFiles = new TreeSet<>();
 
         // find all json files in components and camel-core
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -180,8 +180,6 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
         // make sure to create out dir
         componentsOutDir.mkdirs();
 
-        Set<String> alternativeSchemes = new HashSet<>();
-
         for (File file : jsonFiles) {
             File to = new File(componentsOutDir, file.getName());
             try {
@@ -196,7 +194,7 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = componentsOutDir.list();
-            List<String> components = new ArrayList<String>();
+            List<String> components = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -223,8 +221,8 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
         getLog().info("Copying all Camel dataformat json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> dataFormatFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> dataFormatFiles = new TreeSet<>();
 
         // find all data formats from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -267,7 +265,7 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = dataFormatsOutDir.list();
-            List<String> dataFormats = new ArrayList<String>();
+            List<String> dataFormats = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -294,8 +292,8 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
         getLog().info("Copying all Camel language json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> languageFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> languageFiles = new TreeSet<>();
 
         // find all languages from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -338,7 +336,7 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = languagesOutDir.list();
-            List<String> languages = new ArrayList<String>();
+            List<String> languages = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -365,8 +363,8 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
         getLog().info("Copying all Camel other json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> otherFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> otherFiles = new TreeSet<>();
 
         // find all languages from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -422,7 +420,7 @@ public class PrepareCatalogKarafMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = othersOutDir.list();
-            List<String> others = new ArrayList<String>();
+            List<String> others = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
index 9154da5..22e3764 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
@@ -209,11 +209,11 @@ public class PrepareCatalogMojo extends AbstractMojo {
         getLog().info("Copying all Camel model json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> duplicateJsonFiles = new TreeSet<File>();
-        Set<File> missingLabels = new TreeSet<File>();
-        Set<File> missingJavaDoc = new TreeSet<File>();
-        Map<String, Set<String>> usedLabels = new TreeMap<String, Set<String>>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> duplicateJsonFiles = new TreeSet<>();
+        Set<File> missingLabels = new TreeSet<>();
+        Set<File> missingJavaDoc = new TreeSet<>();
+        Map<String, Set<String>> usedLabels = new TreeMap<>();
 
         // find all json files in camel-core
         if (coreDir != null && coreDir.isDirectory()) {
@@ -262,7 +262,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
                         for (String s : labels) {
                             Set<String> models = usedLabels.get(s);
                             if (models == null) {
-                                models = new TreeSet<String>();
+                                models = new TreeSet<>();
                                 usedLabels.put(s, models);
                             }
                             models.add(name);
@@ -295,7 +295,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = modelsOutDir.list();
-            List<String> models = new ArrayList<String>();
+            List<String> models = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -325,14 +325,14 @@ public class PrepareCatalogMojo extends AbstractMojo {
         getLog().info("Copying all Camel component json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> duplicateJsonFiles = new TreeSet<File>();
-        Set<File> componentFiles = new TreeSet<File>();
-        Set<File> missingComponents = new TreeSet<File>();
-        Map<String, Set<String>> usedComponentLabels = new TreeMap<String, Set<String>>();
-        Set<String> usedOptionLabels = new TreeSet<String>();
-        Set<String> unlabeledOptions = new TreeSet<String>();
-        Set<File> missingFirstVersions = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> duplicateJsonFiles = new TreeSet<>();
+        Set<File> componentFiles = new TreeSet<>();
+        Set<File> missingComponents = new TreeSet<>();
+        Map<String, Set<String>> usedComponentLabels = new TreeMap<>();
+        Set<String> usedOptionLabels = new TreeSet<>();
+        Set<String> unlabeledOptions = new TreeSet<>();
+        Set<File> missingFirstVersions = new TreeSet<>();
 
         // find all json files in components and camel-core
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -419,7 +419,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
                     for (String s : labels) {
                         Set<String> components = usedComponentLabels.get(s);
                         if (components == null) {
-                            components = new TreeSet<String>();
+                            components = new TreeSet<>();
                             usedComponentLabels.put(s, components);
                         }
                         components.add(name);
@@ -495,7 +495,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = componentsOutDir.list();
-            List<String> components = new ArrayList<String>();
+            List<String> components = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -538,11 +538,11 @@ public class PrepareCatalogMojo extends AbstractMojo {
         getLog().info("Copying all Camel dataformat json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> duplicateJsonFiles = new TreeSet<File>();
-        Set<File> dataFormatFiles = new TreeSet<File>();
-        Map<String, Set<String>> usedLabels = new TreeMap<String, Set<String>>();
-        Set<File> missingFirstVersions = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> duplicateJsonFiles = new TreeSet<>();
+        Set<File> dataFormatFiles = new TreeSet<>();
+        Map<String, Set<String>> usedLabels = new TreeMap<>();
+        Set<File> missingFirstVersions = new TreeSet<>();
 
         // find all data formats from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -591,7 +591,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
                     for (String s : labels) {
                         Set<String> dataFormats = usedLabels.get(s);
                         if (dataFormats == null) {
-                            dataFormats = new TreeSet<String>();
+                            dataFormats = new TreeSet<>();
                             usedLabels.put(s, dataFormats);
                         }
                         dataFormats.add(name);
@@ -622,7 +622,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = dataFormatsOutDir.list();
-            List<String> dataFormats = new ArrayList<String>();
+            List<String> dataFormats = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -656,11 +656,11 @@ public class PrepareCatalogMojo extends AbstractMojo {
         getLog().info("Copying all Camel language json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> duplicateJsonFiles = new TreeSet<File>();
-        Set<File> languageFiles = new TreeSet<File>();
-        Map<String, Set<String>> usedLabels = new TreeMap<String, Set<String>>();
-        Set<File> missingFirstVersions = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> duplicateJsonFiles = new TreeSet<>();
+        Set<File> languageFiles = new TreeSet<>();
+        Map<String, Set<String>> usedLabels = new TreeMap<>();
+        Set<File> missingFirstVersions = new TreeSet<>();
 
         // find all languages from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -709,7 +709,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
                     for (String s : labels) {
                         Set<String> languages = usedLabels.get(s);
                         if (languages == null) {
-                            languages = new TreeSet<String>();
+                            languages = new TreeSet<>();
                             usedLabels.put(s, languages);
                         }
                         languages.add(name);
@@ -740,7 +740,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = languagesOutDir.list();
-            List<String> languages = new ArrayList<String>();
+            List<String> languages = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -774,11 +774,11 @@ public class PrepareCatalogMojo extends AbstractMojo {
         getLog().info("Copying all Camel other json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> duplicateJsonFiles = new TreeSet<File>();
-        Set<File> otherFiles = new TreeSet<File>();
-        Map<String, Set<String>> usedLabels = new TreeMap<String, Set<String>>();
-        Set<File> missingFirstVersions = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> duplicateJsonFiles = new TreeSet<>();
+        Set<File> otherFiles = new TreeSet<>();
+        Map<String, Set<String>> usedLabels = new TreeMap<>();
+        Set<File> missingFirstVersions = new TreeSet<>();
 
         // find all others from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -842,7 +842,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
                     for (String s : labels) {
                         Set<String> others = usedLabels.get(s);
                         if (others == null) {
-                            others = new TreeSet<String>();
+                            others = new TreeSet<>();
                             usedLabels.put(s, others);
                         }
                         others.add(name);
@@ -873,7 +873,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = othersOutDir.list();
-            List<String> others = new ArrayList<String>();
+            List<String> others = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -951,9 +951,9 @@ public class PrepareCatalogMojo extends AbstractMojo {
         getLog().info("Copying all Camel documents (ascii docs)");
 
         // lets use sorted set/maps
-        Set<File> adocFiles = new TreeSet<File>();
-        Set<File> missingAdocFiles = new TreeSet<File>();
-        Set<File> duplicateAdocFiles = new TreeSet<File>();
+        Set<File> adocFiles = new TreeSet<>();
+        Set<File> missingAdocFiles = new TreeSet<>();
+        Set<File> duplicateAdocFiles = new TreeSet<>();
 
         // find all camel maven modules
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -1057,7 +1057,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = documentsOutDir.list();
-            List<String> documents = new ArrayList<String>();
+            List<String> documents = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".adoc")) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogSpringBootMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogSpringBootMojo.java
index 4557e4d..1cdbaa8 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogSpringBootMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogSpringBootMojo.java
@@ -134,8 +134,8 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
         getLog().info("Copying all Camel component json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> componentFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> componentFiles = new TreeSet<>();
 
         // find all json files in components and camel-core
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -201,7 +201,7 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = componentsOutDir.list();
-            List<String> components = new ArrayList<String>();
+            List<String> components = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -228,8 +228,8 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
         getLog().info("Copying all Camel dataformat json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> dataFormatFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> dataFormatFiles = new TreeSet<>();
 
         // find all data formats from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -283,7 +283,7 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = dataFormatsOutDir.list();
-            List<String> dataFormats = new ArrayList<String>();
+            List<String> dataFormats = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -310,8 +310,8 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
         getLog().info("Copying all Camel language json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> languageFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> languageFiles = new TreeSet<>();
 
         // find all languages from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -365,7 +365,7 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = languagesOutDir.list();
-            List<String> languages = new ArrayList<String>();
+            List<String> languages = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
@@ -392,8 +392,8 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
         getLog().info("Copying all Camel other json descriptors");
 
         // lets use sorted set/maps
-        Set<File> jsonFiles = new TreeSet<File>();
-        Set<File> otherFiles = new TreeSet<File>();
+        Set<File> jsonFiles = new TreeSet<>();
+        Set<File> otherFiles = new TreeSet<>();
 
         // find all other from the components directory
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -461,7 +461,7 @@ public class PrepareCatalogSpringBootMojo extends AbstractMojo {
             FileOutputStream fos = new FileOutputStream(all, false);
 
             String[] names = othersOutDir.list();
-            List<String> others = new ArrayList<String>();
+            List<String> others = new ArrayList<>();
             // sort the names
             for (String name : names) {
                 if (name.endsWith(".json")) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
index ecb86ac..33b42fd 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
@@ -555,7 +555,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         // find the component names
         List<String> componentNames = findComponentNames();
 
-        final Set<File> jsonFiles = new TreeSet<File>();
+        final Set<File> jsonFiles = new TreeSet<>();
         PackageHelper.findJsonFiles(buildDir, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
 
         // create auto configuration for the components
@@ -603,7 +603,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         // find the data format names
         List<String> dataFormatNames = findDataFormatNames();
 
-        final Set<File> jsonFiles = new TreeSet<File>();
+        final Set<File> jsonFiles = new TreeSet<>();
         // we can reuse the component model filter
         PackageHelper.findJsonFiles(buildDir, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
 
@@ -649,7 +649,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
         // find the language names
         List<String> languageNames = findLanguageNames();
 
-        final Set<File> jsonFiles = new TreeSet<File>();
+        final Set<File> jsonFiles = new TreeSet<>();
         // we can reuse the component model filter
         PackageHelper.findJsonFiles(buildDir, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
 
@@ -1983,7 +1983,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
     }
 
     private List<String> findComponentNames() {
-        List<String> componentNames = new ArrayList<String>();
+        List<String> componentNames = new ArrayList<>();
         for (Resource r : project.getBuild().getResources()) {
             File f = new File(r.getDirectory());
             if (!f.exists()) {
@@ -2011,7 +2011,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
     }
 
     private List<String> findDataFormatNames() {
-        List<String> dataFormatNames = new ArrayList<String>();
+        List<String> dataFormatNames = new ArrayList<>();
         for (Resource r : project.getBuild().getResources()) {
             File f = new File(r.getDirectory());
             if (!f.exists()) {
@@ -2039,7 +2039,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
     }
 
     private List<String> findLanguageNames() {
-        List<String> languageNames = new ArrayList<String>();
+        List<String> languageNames = new ArrayList<>();
         for (Resource r : project.getBuild().getResources()) {
             File f = new File(r.getDirectory());
             if (!f.exists()) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java
index 8901fe4..7d09144 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java
@@ -115,7 +115,7 @@ public class UpdateReadmeMojo extends AbstractMojo {
         // find the component names
         List<String> componentNames = findComponentNames();
 
-        final Set<File> jsonFiles = new TreeSet<File>();
+        final Set<File> jsonFiles = new TreeSet<>();
         PackageHelper.findJsonFiles(buildDir, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
 
         // only if there is components we should update the documentation files
@@ -184,7 +184,7 @@ public class UpdateReadmeMojo extends AbstractMojo {
         // find the dataformat names
         List<String> dataFormatNames = findDataFormatNames();
 
-        final Set<File> jsonFiles = new TreeSet<File>();
+        final Set<File> jsonFiles = new TreeSet<>();
         PackageHelper.findJsonFiles(buildDir, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
 
         // only if there is dataformat we should update the documentation files
@@ -245,7 +245,7 @@ public class UpdateReadmeMojo extends AbstractMojo {
         // find the language names
         List<String> languageNames = findLanguageNames();
 
-        final Set<File> jsonFiles = new TreeSet<File>();
+        final Set<File> jsonFiles = new TreeSet<>();
         PackageHelper.findJsonFiles(buildDir, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
 
         // only if there is language we should update the documentation files
@@ -295,7 +295,7 @@ public class UpdateReadmeMojo extends AbstractMojo {
             return;
         }
 
-        final Set<File> jsonFiles = new TreeSet<File>();
+        final Set<File> jsonFiles = new TreeSet<>();
 
         // find all json files in camel-core
         File coreDir = new File(".");
@@ -1164,7 +1164,7 @@ public class UpdateReadmeMojo extends AbstractMojo {
     }
 
     private List<String> findComponentNames() {
-        List<String> componentNames = new ArrayList<String>();
+        List<String> componentNames = new ArrayList<>();
         for (Resource r : project.getBuild().getResources()) {
             File f = new File(r.getDirectory());
             if (!f.exists()) {
@@ -1192,7 +1192,7 @@ public class UpdateReadmeMojo extends AbstractMojo {
     }
 
     private List<String> findDataFormatNames() {
-        List<String> dataFormatNames = new ArrayList<String>();
+        List<String> dataFormatNames = new ArrayList<>();
         for (Resource r : project.getBuild().getResources()) {
             File f = new File(r.getDirectory());
             if (!f.exists()) {
@@ -1219,7 +1219,7 @@ public class UpdateReadmeMojo extends AbstractMojo {
         return dataFormatNames;
     }
     private List<String> findLanguageNames() {
-        List<String> languageNames = new ArrayList<String>();
+        List<String> languageNames = new ArrayList<>();
         for (Resource r : project.getBuild().getResources()) {
             File f = new File(r.getDirectory());
             if (!f.exists()) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ValidateComponentMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ValidateComponentMojo.java
index 654bd0e..82f079b 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ValidateComponentMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ValidateComponentMojo.java
@@ -99,7 +99,7 @@ public class ValidateComponentMojo extends AbstractMojo {
         if (!validate) {
             getLog().info("Validation disabled");
         } else {
-            final Set<File> jsonFiles = new TreeSet<File>();
+            final Set<File> jsonFiles = new TreeSet<>();
             PackageHelper.findJsonFiles(outDir, jsonFiles, new CamelComponentsFileFilter());
             boolean failed = false;
 
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
index 65fd4aa..a182dae 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
@@ -42,9 +42,9 @@ public class ComponentModel {
     private String groupId;
     private String artifactId;
     private String version;
-    private final List<ComponentOptionModel> componentOptions = new ArrayList<ComponentOptionModel>();
-    private final List<EndpointOptionModel> endpointPathOptions = new ArrayList<EndpointOptionModel>();
-    private final List<EndpointOptionModel> endpointOptions = new ArrayList<EndpointOptionModel>();
+    private final List<ComponentOptionModel> componentOptions = new ArrayList<>();
+    private final List<EndpointOptionModel> endpointPathOptions = new ArrayList<>();
+    private final List<EndpointOptionModel> endpointOptions = new ArrayList<>();
 
     public ComponentModel(boolean coreOnly) {
         this.coreOnly = coreOnly;
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java
index e63d71b..09bea31 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/DataFormatModel.java
@@ -38,7 +38,7 @@ public class DataFormatModel {
     private String groupId;
     private String artifactId;
     private String version;
-    private final List<DataFormatOptionModel> dataFormatOptions = new ArrayList<DataFormatOptionModel>();
+    private final List<DataFormatOptionModel> dataFormatOptions = new ArrayList<>();
 
     public DataFormatModel() {
         this(false);
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EipModel.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EipModel.java
index 1845151..970288b 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EipModel.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EipModel.java
@@ -30,7 +30,7 @@ public class EipModel {
     private String deprecationNote;
     private boolean input;
     private boolean output;
-    private final List<EipOptionModel> eipOptions = new ArrayList<EipOptionModel>();
+    private final List<EipOptionModel> eipOptions = new ArrayList<>();
 
     public String getName() {
         return name;
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
index c664113..22079a3 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
@@ -38,7 +38,7 @@ public class LanguageModel {
     private String groupId;
     private String artifactId;
     private String version;
-    private final List<LanguageOptionModel> languageOptions = new ArrayList<LanguageOptionModel>();
+    private final List<LanguageOptionModel> languageOptions = new ArrayList<>();
 
     public LanguageModel() {
         this(false);
diff --git a/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java b/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
index 25315c0..ad29595 100644
--- a/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
+++ b/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
@@ -157,7 +157,7 @@ public class EmbeddedMojo extends AbstractExecMojo {
     }
 
     protected String[] createArguments() {
-        List<String> args = new ArrayList<String>(5);
+        List<String> args = new ArrayList<>(5);
         args.add("-duration");
         args.add(getDuration());
 
diff --git a/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java b/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
index cb0c860..413bb86 100644
--- a/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
+++ b/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
@@ -309,7 +309,7 @@ public class RunMojo extends AbstractExecMojo {
         }
 
         // lets create the command line arguments to pass in...
-        List<String> args = new ArrayList<String>();
+        List<String> args = new ArrayList<>();
         if (jndiProperties != null) {
             args.add("-j");
             args.add(jndiProperties);
@@ -460,7 +460,7 @@ public class RunMojo extends AbstractExecMojo {
     @SuppressWarnings("deprecation")
     private void terminateThreads(ThreadGroup threadGroup) {
         long startTime = System.currentTimeMillis();
-        Set<Thread> uncooperativeThreads = new HashSet<Thread>(); // these were not responsive
+        Set<Thread> uncooperativeThreads = new HashSet<>(); // these were not responsive
         // to interruption
         for (Collection<Thread> threads = getActiveThreads(threadGroup); !threads.isEmpty(); threads = getActiveThreads(threadGroup), threads
             .removeAll(uncooperativeThreads)) {
@@ -524,7 +524,7 @@ public class RunMojo extends AbstractExecMojo {
     private Collection<Thread> getActiveThreads(ThreadGroup threadGroup) {
         Thread[] threads = new Thread[threadGroup.activeCount()];
         int numThreads = threadGroup.enumerate(threads);
-        Collection<Thread> result = new ArrayList<Thread>(numThreads);
+        Collection<Thread> result = new ArrayList<>(numThreads);
         for (int i = 0; i < threads.length && threads[i] != null; i++) {
             result.add(threads[i]);
         }
@@ -552,7 +552,7 @@ public class RunMojo extends AbstractExecMojo {
      * @throws org.apache.maven.plugin.MojoExecutionException
      */
     private ClassLoader getClassLoader() throws MojoExecutionException {
-        List<URL> classpathURLs = new ArrayList<URL>();
+        List<URL> classpathURLs = new ArrayList<>();
         this.addRelevantPluginDependenciesToClasspath(classpathURLs);
         this.addRelevantProjectDependenciesToClasspath(classpathURLs);
 
@@ -629,7 +629,7 @@ public class RunMojo extends AbstractExecMojo {
     }
 
     private Collection<Artifact> getAllNonTestScopedDependencies() throws MojoExecutionException {
-        List<Artifact> answer = new ArrayList<Artifact>();
+        List<Artifact> answer = new ArrayList<>();
 
         for (Artifact artifact : getAllDependencies()) {
 
@@ -643,7 +643,7 @@ public class RunMojo extends AbstractExecMojo {
 
     // generic method to retrieve all the transitive dependencies
     private Collection<Artifact> getAllDependencies() throws MojoExecutionException {
-        List<Artifact> artifacts = new ArrayList<Artifact>();
+        List<Artifact> artifacts = new ArrayList<>();
 
         for (Iterator<?> dependencies = project.getDependencies().iterator(); dependencies.hasNext();) {
             Dependency dependency = (Dependency)dependencies.next();
@@ -676,7 +676,7 @@ public class RunMojo extends AbstractExecMojo {
                 art.setFile(new File(dependency.getSystemPath()));
             }
 
-            List<String> exclusions = new ArrayList<String>();
+            List<String> exclusions = new ArrayList<>();
             for (Exclusion exclusion : dependency.getExclusions()) {
                 exclusions.add(exclusion.getGroupId() + ":" + exclusion.getArtifactId());
             }
@@ -704,7 +704,7 @@ public class RunMojo extends AbstractExecMojo {
         if (this.includePluginDependencies) {
             if (this.executableDependency == null) {
                 getLog().debug("All Plugin Dependencies will be included.");
-                relevantDependencies = new HashSet<Artifact>(this.pluginDependencies);
+                relevantDependencies = new HashSet<>(this.pluginDependencies);
             } else {
                 getLog().debug("Selected plugin Dependencies will be included.");
                 Artifact executableArtifact = this.findExecutableArtifact();

-- 
To stop receiving notification emails like this one, please contact
bvahdat@apache.org.