From 2d381afcd78b61d8791ace22b676e88271b3bdce Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Mon, 13 Aug 2018 14:39:43 -0400 Subject: Fix checkstyle in utils Cleared all the checkstyle in these 2 submodules. Issue-ID: POLICY-881 Change-Id: I248e1894aebf549d5a4f8669a6466ec227d40b55 Signed-off-by: Pamela Dragosh --- .../onap/policy/common/utils/time/TestTimeMulti.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java') diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java b/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java index 7a8277c7..2782eb72 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java @@ -56,6 +56,7 @@ public class TestTimeMulti extends CurrentTime { private final Object locker = new Object(); /** + * Constructor. * * @param nthreads number of threads that will be sleeping simultaneously */ @@ -122,7 +123,7 @@ public class TestTimeMulti extends CurrentTime { */ private void wakeThreads() { Info info = queue.poll(); - if(info == null) { + if (info == null) { return; } @@ -157,6 +158,8 @@ public class TestTimeMulti extends CurrentTime { private final CountDownLatch latch = new CountDownLatch(1); /** + * Constructor. + * * @param awakenAtMs time, in milliseconds, at which the associated thread should * awaken */ @@ -179,20 +182,20 @@ public class TestTimeMulti extends CurrentTime { * Blocks the current thread until awakened (i.e., until its latch is * decremented). * - * @throws InterruptedException + * @throws InterruptedException can be interrupted */ public void await() throws InterruptedException { latch.await(); } @Override - public int compareTo(Info o) { - int diff = Long.compare(awakenAtMs, o.awakenAtMs); + public int compareTo(Info object) { + int diff = Long.compare(awakenAtMs, object.awakenAtMs); // this assumes that Object.toString() is unique for each Info object - if (diff == 0) - diff = this.toString().compareTo(o.toString()); - + if (diff == 0) { + diff = this.toString().compareTo(object.toString()); + } return diff; } -- cgit 1.2.3-korg