diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2018-09-27 12:28:19 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2018-09-27 16:59:41 -0400 |
commit | 1253af9756e8a7027fade727da68b38dff2d5159 (patch) | |
tree | 39b785d0ddad197933e6e3df4b21376f1d57ef9e /controlloop/common/feature-controlloop-trans | |
parent | 1c32e0c17febcbef90756f3eef4868542723cc81 (diff) |
Fix more sonar issues
Most of these are minor issues along with a few others.
They have been bugging me so I thought I would get them
done. Some also do not show up on sonarlint.
Issue-ID: POLICY-1129
Change-Id: I31f2765f6babdfa80b23f0589daacc98da8d2002
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/feature-controlloop-trans')
-rw-r--r-- | controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java index 790d434fd..a1c587b07 100644 --- a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java +++ b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java @@ -313,8 +313,7 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics { } protected void evicted(VirtualControlLoopNotification notification) { - // transaction(notification, ZonedDateTime.now()); - MDCTransaction trans = MDCTransaction + MDCTransaction .newTransaction(notification.getRequestId().toString(), notification.getFrom()) .setServiceName(notification.getClosedLoopControlName()).setTargetEntity(notification.getTarget()) .setStartTime(notification.getNotificationTime().toInstant()).setEndTime(Instant.now()) @@ -439,7 +438,7 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics { default: /* unexpected */ logger.warn("unexpected notification type {} in notification {}", - notification.getNotification().toString(), notification); + notification.getNotification(), notification); break; } @@ -448,7 +447,8 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics { @Override public String toString() { - final StringBuffer sb = new StringBuffer("CacheBasedControlLoopMetricsManager{"); + final StringBuilder sb = new StringBuilder(); + sb.append("CacheBasedControlLoopMetricsManager{"); sb.append("cacheSize=").append(cacheSize); sb.append(", transactionTimeout=").append(transactionTimeout); sb.append('}'); |