You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/12/23 09:43:58 UTC
[05/14] camel git commit: Fixed CS
Fixed CS
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/01581e5c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/01581e5c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/01581e5c
Branch: refs/heads/master
Commit: 01581e5c9146c54ae0f1594542c3336c7154a165
Parents: bf1e1b2
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Dec 22 10:17:51 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Dec 23 09:05:13 2015 +0100
----------------------------------------------------------------------
.../camel/catalog/DefaultCamelCatalog.java | 3 ++-
.../camel/catalog/EndpointValidationResult.java | 22 ++++++++++++--------
.../apache/camel/catalog/CamelCatalogTest.java | 4 ++--
3 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/01581e5c/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
index 171fa33..451bcb2 100644
--- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
+++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
@@ -38,11 +38,12 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
+import org.w3c.dom.Document;
+
import org.apache.camel.catalog.util.CatalogHelper;
import org.apache.camel.catalog.util.JSonSchemaHelper;
import org.apache.camel.catalog.util.URISupport;
import org.apache.camel.catalog.util.VersionHelper;
-import org.w3c.dom.Document;
import static org.apache.camel.catalog.util.CatalogHelper.after;
import static org.apache.camel.catalog.util.JSonSchemaHelper.getPropertyDefaultValue;
http://git-wip-us.apache.org/repos/asf/camel/blob/01581e5c/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
index 7bb33e1..af97eb7 100644
--- a/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
+++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
@@ -5,9 +5,9 @@
* 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
+ * 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.
@@ -49,9 +49,13 @@ public class EndpointValidationResult implements Serializable {
}
public boolean isSuccess() {
- return syntaxError == null && unknownComponent == null
- && unknown == null && required == null && invalidEnum == null && invalidEnumChoices == null
- && invalidReference == null && invalidBoolean == null && invalidInteger == null && invalidNumber == null;
+ boolean ok = syntaxError == null && unknownComponent == null
+ && unknown == null && required == null;
+ if (ok) {
+ ok = invalidEnum == null && invalidEnumChoices == null && invalidReference == null
+ && invalidBoolean == null && invalidInteger == null && invalidNumber == null;
+ }
+ return ok;
}
public void addSyntaxError(String syntaxError) {
@@ -99,21 +103,21 @@ public class EndpointValidationResult implements Serializable {
public void addInvalidBoolean(String name, String value) {
if (invalidBoolean == null) {
- invalidBoolean = new LinkedHashMap<String, String>();;
+ invalidBoolean = new LinkedHashMap<String, String>();
}
invalidBoolean.put(name, value);
}
public void addInvalidInteger(String name, String value) {
if (invalidInteger == null) {
- invalidInteger = new LinkedHashMap<String, String>();;
+ invalidInteger = new LinkedHashMap<String, String>();
}
invalidInteger.put(name, value);
}
public void addInvalidNumber(String name, String value) {
if (invalidNumber == null) {
- invalidNumber = new LinkedHashMap<String, String>();;
+ invalidNumber = new LinkedHashMap<String, String>();
}
invalidNumber.put(name, value);
}
http://git-wip-us.apache.org/repos/asf/camel/blob/01581e5c/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java b/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index 32eccd5..944456a 100644
--- a/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -35,10 +35,10 @@ import static org.junit.Assert.assertTrue;
public class CamelCatalogTest {
- private static final Logger LOG = LoggerFactory.getLogger(CamelCatalogTest.class);
-
static CamelCatalog catalog;
+ private static final Logger LOG = LoggerFactory.getLogger(CamelCatalogTest.class);
+
@BeforeClass
public static void createCamelCatalog() {
catalog = new DefaultCamelCatalog();