Repository: camel Updated Branches: refs/heads/master 8c03d36a6 -> 19b80eede
CAMEL-10150: Camel-Apt: Check for empty lines in parseAsMap method of EndpointAnnotationProcessor Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b0321bc8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b0321bc8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b0321bc8 Branch: refs/heads/master Commit: b0321bc8d00a0d819f91afb0684cab07cc54a253 Parents: 8c03d36 Author: Andrea Cosentino <anco...@gmail.com> Authored: Mon Jul 18 12:53:22 2016 +0200 Committer: Andrea Cosentino <anco...@gmail.com> Committed: Mon Jul 18 12:53:22 2016 +0200 ---------------------------------------------------------------------- .../services/org/apache/camel/component/influxdb | 2 +- .../camel/tools/apt/EndpointAnnotationProcessor.java | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/b0321bc8/components/camel-influxdb/src/main/resources/META-INF/services/org/apache/camel/component/influxdb ---------------------------------------------------------------------- diff --git a/components/camel-influxdb/src/main/resources/META-INF/services/org/apache/camel/component/influxdb b/components/camel-influxdb/src/main/resources/META-INF/services/org/apache/camel/component/influxdb index f8e9043..cdb708d 100644 --- a/components/camel-influxdb/src/main/resources/META-INF/services/org/apache/camel/component/influxdb +++ b/components/camel-influxdb/src/main/resources/META-INF/services/org/apache/camel/component/influxdb @@ -14,4 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -class=org.apache.camel.component.influxdb.InfluxDbComponent \ No newline at end of file +class=org.apache.camel.component.influxdb.InfluxDbComponent http://git-wip-us.apache.org/repos/asf/camel/blob/b0321bc8/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java ---------------------------------------------------------------------- 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 9f93844..2d3c74e 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 @@ -824,12 +824,14 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor { Map<String, String> answer = new HashMap<String, String>(); String[] lines = data.split("\n"); for (String line : lines) { - int idx = line.indexOf('='); - String key = line.substring(0, idx); - String value = line.substring(idx + 1); - // remove ending line break for the values - value = value.trim().replaceAll("\n", ""); - answer.put(key.trim(), value); + if (!line.isEmpty()) { + int idx = line.indexOf('='); + String key = line.substring(0, idx); + String value = line.substring(idx + 1); + // remove ending line break for the values + value = value.trim().replaceAll("\n", ""); + answer.put(key.trim(), value); + } } return answer; }