File tree Expand file tree Collapse file tree
src/main/java/com/bettercloud/vault/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,19 +76,15 @@ public List<String> getAuditNonHmacRequestKeys() {
7676 if (auditNonHmacRequestKeys == null ) {
7777 return null ;
7878 } else {
79- final List <String > clone = new ArrayList <>();
80- clone .addAll (auditNonHmacRequestKeys );
81- return clone ;
79+ return new ArrayList <>(auditNonHmacRequestKeys );
8280 }
8381 }
8482
8583 public List <String > getAuditNonHmacResponseKeys () {
8684 if (auditNonHmacResponseKeys == null ) {
8785 return null ;
8886 } else {
89- final List <String > clone = new ArrayList <>();
90- clone .addAll (auditNonHmacResponseKeys );
91- return clone ;
87+ return new ArrayList <>(auditNonHmacResponseKeys );
9288 }
9389 }
9490
Original file line number Diff line number Diff line change @@ -89,19 +89,15 @@ public List<String> getAuditNonHmacRequestKeys() {
8989 if (auditNonHmacRequestKeys == null ) {
9090 return null ;
9191 } else {
92- final List <String > clone = new ArrayList <>();
93- clone .addAll (auditNonHmacRequestKeys );
94- return clone ;
92+ return new ArrayList <>(auditNonHmacRequestKeys );
9593 }
9694 }
9795
9896 public List <String > getAuditNonHmacResponseKeys () {
9997 if (auditNonHmacResponseKeys == null ) {
10098 return null ;
10199 } else {
102- final List <String > clone = new ArrayList <>();
103- clone .addAll (auditNonHmacResponseKeys );
104- return clone ;
100+ return new ArrayList <>(auditNonHmacResponseKeys );
105101 }
106102 }
107103
Original file line number Diff line number Diff line change @@ -221,9 +221,7 @@ public List<String> getAllowedDomains() {
221221 if (allowedDomains == null ) {
222222 return null ;
223223 } else {
224- final List <String > clone = new ArrayList <>();
225- clone .addAll (allowedDomains );
226- return clone ;
224+ return new ArrayList <>(allowedDomains );
227225 }
228226 }
229227
You can’t perform that action at this time.
0 commit comments