Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix checkstyle warnings in config-manager
[controller.git]
/
opendaylight
/
config
/
config-manager
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
config
/
manager
/
impl
/
DeadlockMonitor.java
diff --git
a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/DeadlockMonitor.java
b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/DeadlockMonitor.java
index d34a739703e8f8eba7d60a90ca6fa713a301f802..f25dce89e8f536e84e979b9aaee6887d28236a1d 100644
(file)
--- a/
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/DeadlockMonitor.java
+++ b/
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/DeadlockMonitor.java
@@
-1,17
+1,16
@@
package org.opendaylight.controller.config.manager.impl;
package org.opendaylight.controller.config.manager.impl;
-import org.opendaylight.controller.config.api.ModuleIdentifier;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.GuardedBy;
import java.util.Deque;
import java.util.LinkedList;
import java.util.concurrent.TimeUnit;
import java.util.Deque;
import java.util.LinkedList;
import java.util.concurrent.TimeUnit;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.GuardedBy;
+import org.opendaylight.controller.config.api.ModuleIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DeadlockMonitor implements AutoCloseable {
public class DeadlockMonitor implements AutoCloseable {
- private static final Logger
logger = LoggerFactory.getLogger(DeadlockMonitorRunnable
.class);
+ private static final Logger
LOG = LoggerFactory.getLogger(DeadlockMonitor
.class);
private static final long WARN_AFTER_MILLIS = 5000;
private static final long WARN_AFTER_MILLIS = 5000;
@@
-43,7
+42,7
@@
public class DeadlockMonitor implements AutoCloseable {
moduleIdentifierWithNanosStack.push(current);
top = current;
}
moduleIdentifierWithNanosStack.push(current);
top = current;
}
-
logger
.trace("setCurrentlyInstantiatedModule {}, top {}", currentlyInstantiatedModule, top);
+
LOG
.trace("setCurrentlyInstantiatedModule {}, top {}", currentlyInstantiatedModule, top);
}
public boolean isAlive() {
}
public boolean isAlive() {
@@
-78,7
+77,7
@@
public class DeadlockMonitor implements AutoCloseable {
// is the getInstance() running longer than WARN_AFTER_MILLIS ?
long runningTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - copy.nanoTime);
if (runningTime > WARN_AFTER_MILLIS) {
// is the getInstance() running longer than WARN_AFTER_MILLIS ?
long runningTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - copy.nanoTime);
if (runningTime > WARN_AFTER_MILLIS) {
-
logger
.warn("{} did not finish after {} ms", copy.moduleIdentifier, runningTime);
+
LOG
.warn("{} did not finish after {} ms", copy.moduleIdentifier, runningTime);
}
}
try {
}
}
try {
@@
-87,7
+86,7
@@
public class DeadlockMonitor implements AutoCloseable {
interrupt();
}
}
interrupt();
}
}
-
logger
.trace("Exiting {}", this);
+
LOG
.trace("Exiting {}", this);
}
@Override
}
@Override
@@
-122,14
+121,21
@@
public class DeadlockMonitor implements AutoCloseable {
@Override
public boolean equals(Object o) {
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
ModuleIdentifierWithNanos that = (ModuleIdentifierWithNanos) o;
ModuleIdentifierWithNanos that = (ModuleIdentifierWithNanos) o;
- if (nanoTime != that.nanoTime) return false;
- if (moduleIdentifier != null ? !moduleIdentifier.equals(that.moduleIdentifier) : that.moduleIdentifier != null)
+ if (nanoTime != that.nanoTime) {
+ return false;
+ }
+ if (moduleIdentifier != null ? !moduleIdentifier.equals(that.moduleIdentifier) : that.moduleIdentifier != null) {
return false;
return false;
+ }
return true;
}
return true;
}