You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/09/20 09:01:13 UTC

[camel] branch master updated (7a5e035 -> 36dec19)

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

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


    from 7a5e035  Polished
     new 38efc98  CAMEL-13990: Add schema name checks in EndpointAnnotationProcessor
     new 2d4e17d  CAMEL-13990: Change from ERROR to WARN for the schema name message
     new 36dec19  Regen

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 components/camel-xj/src/main/docs/xj-component.adoc            |  2 +-
 .../camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java   | 10 ++++++++--
 docs/components/modules/ROOT/pages/xj-component.adoc           |  2 +-
 .../apache/camel/tools/apt/EndpointAnnotationProcessor.java    |  9 +++++++++
 4 files changed, 19 insertions(+), 4 deletions(-)


[camel] 02/03: CAMEL-13990: Change from ERROR to WARN for the schema name message

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2d4e17d36e27658af92fe4390396bb357d2a15f9
Author: Omar Al-Safi <om...@gmail.com>
AuthorDate: Thu Sep 19 09:55:46 2019 +0200

    CAMEL-13990: Change from ERROR to WARN for the schema name message
    
    Signed-off-by: Omar Al-Safi <om...@gmail.com>
---
 .../java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
index 353267c..25dac5a 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
@@ -127,7 +127,7 @@ public class EndpointAnnotationProcessor extends AbstractCamelAnnotationProcesso
     private void validateSchemaName(final String schemaName, final TypeElement classElement) {
         // our schema name has to be in lowercase
         if (!schemaName.equals(schemaName.toLowerCase())) {
-            processingEnv.getMessager().printMessage(Kind.ERROR, String.format("Schema name '%s' in '%s' must be lowercase!", schemaName, classElement.getQualifiedName()));
+            processingEnv.getMessager().printMessage(Kind.WARNING, String.format("Mixed case schema name in '%s' with value '%s' has been deprecated. Please use lowercase only!", classElement.getQualifiedName(), schemaName));
         }
     }
 


[camel] 01/03: CAMEL-13990: Add schema name checks in EndpointAnnotationProcessor

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 38efc986773aa9544d29c14ed4c255784d6dc438
Author: Omar Al-Safi <om...@gmail.com>
AuthorDate: Wed Sep 18 13:38:02 2019 +0200

    CAMEL-13990: Add schema name checks in EndpointAnnotationProcessor
    
    Signed-off-by: Omar Al-Safi <om...@gmail.com>
---
 .../org/apache/camel/tools/apt/EndpointAnnotationProcessor.java  | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
index 2de4bbb..353267c 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
@@ -38,6 +38,7 @@ import javax.lang.model.type.TypeKind;
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.util.ElementFilter;
 import javax.lang.model.util.Elements;
+import javax.tools.Diagnostic.Kind;
 import javax.tools.FileObject;
 import javax.tools.StandardLocation;
 
@@ -94,6 +95,7 @@ public class EndpointAnnotationProcessor extends AbstractCamelAnnotationProcesso
             String extendsScheme = uriEndpoint.extendsScheme();
             String title = uriEndpoint.title();
             final String label = uriEndpoint.label();
+            validateSchemaName(scheme, classElement);
             if (!isNullOrEmpty(scheme)) {
                 // support multiple schemes separated by comma, which maps to the exact same component
                 // for example camel-mail has a bunch of component schema names that does that
@@ -122,6 +124,13 @@ public class EndpointAnnotationProcessor extends AbstractCamelAnnotationProcesso
         }
     }
 
+    private void validateSchemaName(final String schemaName, final TypeElement classElement) {
+        // our schema name has to be in lowercase
+        if (!schemaName.equals(schemaName.toLowerCase())) {
+            processingEnv.getMessager().printMessage(Kind.ERROR, String.format("Schema name '%s' in '%s' must be lowercase!", schemaName, classElement.getQualifiedName()));
+        }
+    }
+
     protected void writeJSonSchemeAndPropertyConfigurer(PrintWriter writer, RoundEnvironment roundEnv, TypeElement classElement, UriEndpoint uriEndpoint,
                                                         String title, String scheme, String extendsScheme, String label, String[] schemes) {
         // gather component information


[camel] 03/03: Regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 36dec19123b1e0646a6d574e4f1bf6f52e663153
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Sep 20 11:00:34 2019 +0200

    Regen
---
 components/camel-xj/src/main/docs/xj-component.adoc            |  2 +-
 .../camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java   | 10 ++++++++--
 docs/components/modules/ROOT/pages/xj-component.adoc           |  2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/components/camel-xj/src/main/docs/xj-component.adoc b/components/camel-xj/src/main/docs/xj-component.adoc
index 8e576fa..a496f20 100644
--- a/components/camel-xj/src/main/docs/xj-component.adoc
+++ b/components/camel-xj/src/main/docs/xj-component.adoc
@@ -86,7 +86,7 @@ with the following path and query parameters:
 |===
 | Name | Description | Default | Type
 | *transformDirection* (producer) | *Required* Sets the transform direction. |  | TransformDirection
-| *allowStAX* (producer) | Whether to allow using StAX as the javax.xml.transform.Source. | true | boolean
+| *allowStAX* (producer) | Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) does not support StAXSource. | false | boolean
 | *contentCache* (producer) | Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be forced to reload at runtime via JMX using the clearCachedStylesheet operation. | true | boolean
 | *deleteOutputFile* (producer) | If you have output=file then this option dictates whether or not the output file should be deleted when the Exchange is done processing. For example suppose the output file is a temporary file, then it can be a good idea to delete it after use. | false | boolean
 | *failOnNullBody* (producer) | Whether or not to throw an exception if the input body is null. | true | boolean
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java
index 199205e..008410a 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/XJEndpointBuilderFactory.java
@@ -66,7 +66,10 @@ public interface XJEndpointBuilderFactory {
             return this;
         }
         /**
-         * Whether to allow using StAX as the javax.xml.transform.Source.
+         * Whether to allow using StAX as the javax.xml.transform.Source. You
+         * can enable this if the XSLT library supports StAX such as the Saxon
+         * library (camel-saxon). The Xalan library (default in JVM) does not
+         * support StAXSource.
          * 
          * The option is a: <code>boolean</code> type.
          * 
@@ -77,7 +80,10 @@ public interface XJEndpointBuilderFactory {
             return this;
         }
         /**
-         * Whether to allow using StAX as the javax.xml.transform.Source.
+         * Whether to allow using StAX as the javax.xml.transform.Source. You
+         * can enable this if the XSLT library supports StAX such as the Saxon
+         * library (camel-saxon). The Xalan library (default in JVM) does not
+         * support StAXSource.
          * 
          * The option will be converted to a <code>boolean</code> type.
          * 
diff --git a/docs/components/modules/ROOT/pages/xj-component.adoc b/docs/components/modules/ROOT/pages/xj-component.adoc
index b9d87e8..2236d8b 100644
--- a/docs/components/modules/ROOT/pages/xj-component.adoc
+++ b/docs/components/modules/ROOT/pages/xj-component.adoc
@@ -87,7 +87,7 @@ with the following path and query parameters:
 |===
 | Name | Description | Default | Type
 | *transformDirection* (producer) | *Required* Sets the transform direction. |  | TransformDirection
-| *allowStAX* (producer) | Whether to allow using StAX as the javax.xml.transform.Source. | true | boolean
+| *allowStAX* (producer) | Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) does not support StAXSource. | false | boolean
 | *contentCache* (producer) | Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be forced to reload at runtime via JMX using the clearCachedStylesheet operation. | true | boolean
 | *deleteOutputFile* (producer) | If you have output=file then this option dictates whether or not the output file should be deleted when the Exchange is done processing. For example suppose the output file is a temporary file, then it can be a good idea to delete it after use. | false | boolean
 | *failOnNullBody* (producer) | Whether or not to throw an exception if the input body is null. | true | boolean