From b5090c9d0808ffc44281ca250ef528d79030dce8 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Wed, 30 Aug 2017 17:20:36 +0530 Subject: 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 --- .../src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'framework') 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 row = new ArrayList<>(); for (List 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); } } -- cgit 1.2.3-korg