Soanr fix: AbsCredBody.java 11/75211/1
authorArundathi Patil <arundpil@in.ibm.com>
Thu, 3 Jan 2019 10:06:08 +0000 (15:36 +0530)
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>
Thu, 3 Jan 2019 10:06:18 +0000 (15:36 +0530)
Fixed sonar issues/code-smells across this file

Issue-ID: AAF-692
Change-Id: I877f37617fca7ea457629a819897a529bc972c97
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/AbsCredBody.java

index c0d16b0..db45e20 100644 (file)
@@ -3,6 +3,8 @@
  * org.onap.aaf
  * ===========================================================================
  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2018 IBM.
  * ===========================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,13 +27,13 @@ import java.util.List;
 
 public abstract class AbsCredBody extends NotifyBody {
 
-       public AbsCredBody(final String name) throws IOException {
+       public AbsCredBody(final String name) {
                super("cred",name);
        }
 
        @Override
        public String user(List<String> row) {
-               if(row.size()>0) {
+               if( (row != null) && !row.isEmpty()) {
                        return row.get(1);
                }
                return null;