diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-08-30 17:20:36 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-08-30 17:23:44 +0530 |
commit | b5090c9d0808ffc44281ca250ef528d79030dce8 (patch) | |
tree | 87ffe1568b5d2a7051212f15537c9a8bf712e13d /framework/src/main | |
parent | 6dd7fd8b3a96e15c121d6e4a5e7b5743afb1b99b (diff) |
Consider missing attributes as blank
sometime the response does not have the required
filed to process and consider it as blank instead of
failing it
CLI-37
Change-Id: I953fcd5ee92aac5ca926029462f15f45ba765dfc
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main')
-rw-r--r-- | framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java b/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java index 48a4e6ea..8b7a9b83 100644 --- a/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java +++ b/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java @@ -123,7 +123,7 @@ public class OnapCommandPrint { for (int i = 0; i < this.findMaxRows(); i++) { List<Object> row = new ArrayList<>(); for (List<String> cols : this.data.values()) { - if (cols.size() > i) { + if (cols != null && cols.size() > i) { String value = cols.get(i); // split the cell into multiple sub rows if (isNormalize && value != null && value.length() > MAX_COLUMN_LENGTH) { @@ -133,7 +133,7 @@ public class OnapCommandPrint { row.add(value); } } else { - // now value exist for this column + // no value exist for this column row.add(null); } } |