summaryrefslogtreecommitdiffstats
path: root/misc/env/src/main/java/org
diff options
context:
space:
mode:
authorThugutla sailakshmi <tsaila10@in.ibm.com>2019-11-08 17:52:36 +0530
committerThugutla sailakshmi <tsaila10@in.ibm.com>2019-11-08 17:52:53 +0530
commit05be8b5c17486951dedce9268e6915c01fb2e620 (patch)
tree4e6d0dc8361f161a3e7fa3c57b22d34c6445d8e7 /misc/env/src/main/java/org
parent333a035c095351e496328ec72c82beb65507e71b (diff)
AbsTrans.java-sonar fixes
Issue-ID: AAF-876 Change-Id: I3ee323bceef7afc8c389b2da3d698f6715a0a0e7 Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
Diffstat (limited to 'misc/env/src/main/java/org')
-rw-r--r--misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java b/misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java
index 9edd3bf4..c785f2cb 100644
--- a/misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java
+++ b/misc/env/src/main/java/org/onap/aaf/misc/env/impl/AbsTrans.java
@@ -122,7 +122,8 @@ public abstract class AbsTrans<ENV extends Env> implements TransStore {
@Override
public Metric auditTrail(LogTarget lt, int indent, StringBuilder sb, int ... flags) {
Metric metric = new Metric();
- int last = (metric.entries = trail.size()) -1;
+ metric.entries = trail.size();
+ int last = (metric.entries) -1;
metric.buckets = flags.length==0?EMPTYF:new float[flags.length];
if (last>=0) {
TimeTaken first = trail.get(0);
@@ -159,7 +160,7 @@ public abstract class AbsTrans<ENV extends Env> implements TransStore {
}
}
} else {
- Stack<Long> stack = new Stack<Long>();
+ Stack<Long> stack = new Stack<>();
for (TimeTaken tt : trail) {
// Create Indentation based on SUB
while (!stack.isEmpty() && tt.end()>stack.peek()) {