Code Review
/
dmaap
/
datarouter.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Removing code smells
[dmaap/datarouter.git]
/
datarouter-node
/
src
/
main
/
java
/
org
/
onap
/
dmaap
/
datarouter
/
node
/
TaskList.java
diff --git
a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/TaskList.java
b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/TaskList.java
index
7fa0dc4
..
a77277f
100644
(file)
--- a/
datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/TaskList.java
+++ b/
datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/TaskList.java
@@
-38,7
+38,7
@@
import java.util.Iterator;
* called.
* </ul>
*/
* called.
* </ul>
*/
-
public
class TaskList {
+class TaskList {
private Iterator<Runnable> runlist;
private HashSet<Runnable> tasks = new HashSet<>();
private Iterator<Runnable> runlist;
private HashSet<Runnable> tasks = new HashSet<>();
@@
-50,7
+50,7
@@
public class TaskList {
/**
* Start executing the sequence of tasks.
*/
/**
* Start executing the sequence of tasks.
*/
-
public
synchronized void startRun() {
+ synchronized void startRun() {
sofar = new HashSet<>();
added = new HashSet<>();
removed = new HashSet<>();
sofar = new HashSet<>();
added = new HashSet<>();
removed = new HashSet<>();
@@
-61,7
+61,7
@@
public class TaskList {
/**
* Get the next task to execute.
*/
/**
* Get the next task to execute.
*/
-
public
synchronized Runnable next() {
+ synchronized Runnable next() {
while (runlist != null) {
if (runlist.hasNext()) {
Runnable task = runlist.next();
while (runlist != null) {
if (runlist.hasNext()) {
Runnable task = runlist.next();
@@
-88,7
+88,7
@@
public class TaskList {
/**
* Add a task to the list of tasks to run whenever the event occurs.
*/
/**
* Add a task to the list of tasks to run whenever the event occurs.
*/
-
public
synchronized void addTask(Runnable task) {
+ synchronized void addTask(Runnable task) {
if (runlist != null) {
added.add(task);
removed.remove(task);
if (runlist != null) {
added.add(task);
removed.remove(task);
@@
-99,7
+99,7
@@
public class TaskList {
/**
* Remove a task from the list of tasks to run whenever the event occurs.
*/
/**
* Remove a task from the list of tasks to run whenever the event occurs.
*/
-
public
synchronized void removeTask(Runnable task) {
+ synchronized void removeTask(Runnable task) {
if (runlist != null) {
removed.add(task);
added.remove(task);
if (runlist != null) {
removed.add(task);
added.remove(task);