aboutsummaryrefslogtreecommitdiffstats
path: root/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-08-13 14:39:43 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-08-13 14:39:50 -0400
commit2d381afcd78b61d8791ace22b676e88271b3bdce (patch)
treebfddd966d78d1683ca01124d00b1799389ade500 /utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java
parent269e543ba89dbf553fc66227f7123a302f56b5b4 (diff)
Fix checkstyle in utils
Cleared all the checkstyle in these 2 submodules. Issue-ID: POLICY-881 Change-Id: I248e1894aebf549d5a4f8669a6466ec227d40b55 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java')
-rw-r--r--utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java17
1 files changed, 10 insertions, 7 deletions
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;
}