aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java4
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample-1.1.yaml (renamed from plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample.yaml)0
2 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);
}
}
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample.yaml b/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample-1.1.yaml
index 95ea4112..95ea4112 100644
--- a/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample.yaml
+++ b/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample-1.1.yaml