summaryrefslogtreecommitdiffstats
path: root/integrity-monitor/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-05-21 12:19:44 -0400
committerJim Hahn <jrh3@att.com>2021-05-21 13:08:54 -0400
commit601a09fd07960d3aadcf972ba7c72dcea9976aef (patch)
tree35d368fc7d8c7dd40e1f76b852ad03bee8780e2e /integrity-monitor/src
parentc7d24b07377cb00ce4c0c531c6d3dff25e04dc12 (diff)
Enhance toString methods in factory classes
The factory classes in policy-endpoints have toString() methods that return "[]" for their list contents. Updated the code to provide a list of the keys rather than just an empty list. Also replaced some toString() methods with lombok. Also replace StringBuilder with concatenation in some cases. Issue-ID: POLICY-3298 Change-Id: I64fca21a4b009f7e09fcc482b5d156753fb7e680 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'integrity-monitor/src')
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
index fb1df8c7..b1d7d5b4 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -287,16 +287,9 @@ public class StateManagementTest extends IntegrityMonitorTestBase {
return null;
}
- final StringBuilder b = new StringBuilder();
-
- b.append(sm.getAdminState());
- b.append(',');
- b.append(sm.getOpState());
- b.append(',');
- b.append(sm.getAvailStatus());
- b.append(',');
- b.append(sm.getStandbyStatus());
-
- return b.toString();
+ return sm.getAdminState()
+ + ',' + sm.getOpState()
+ + ',' + sm.getAvailStatus()
+ + ',' + sm.getStandbyStatus();
}
}