You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by am...@apache.org on 2017/07/11 08:54:22 UTC

incubator-unomi git commit: UNOMI-102 : Add check for hasDeleteColumn when splitting lines

Repository: incubator-unomi
Updated Branches:
  refs/heads/master 11d9efdb5 -> eed5bec78


UNOMI-102 : Add check for hasDeleteColumn when splitting lines


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/eed5bec7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/eed5bec7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/eed5bec7

Branch: refs/heads/master
Commit: eed5bec78d2ad2bac70ac9dc0a8e266d006a197c
Parents: 11d9efd
Author: Abdelkader Midani <am...@apache.org>
Authored: Tue Jul 11 10:54:04 2017 +0200
Committer: Abdelkader Midani <am...@apache.org>
Committed: Tue Jul 11 10:54:18 2017 +0200

----------------------------------------------------------------------
 .../org/apache/unomi/router/core/processor/LineSplitProcessor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/eed5bec7/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitProcessor.java
----------------------------------------------------------------------
diff --git a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitProcessor.java b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitProcessor.java
index 2eadb91..33332bb 100644
--- a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitProcessor.java
+++ b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitProcessor.java
@@ -69,7 +69,7 @@ public class LineSplitProcessor implements Processor {
         profileToImport.setItemType("profile");
         profileToImport.setScope(RouterConstants.SYSTEM_SCOPE);
         if (profileData.length > 0 && StringUtils.isNotBlank(profileData[0])) {
-            if (fieldsMapping.size() != (profileData.length - 1)) {
+            if (hasDeleteColumn && (fieldsMapping.size() != (profileData.length - 1))) {
                 throw new BadProfileDataFormatException("The mapping does not match the number of column : line [" + ((Integer) exchange.getProperty("CamelSplitIndex") + 1) + "]", new Throwable("MAPPING_COLUMN_MATCH"));
             }
             Map<String, Object> properties = new HashMap<>();