Merge pull request #563 from sunilmogadati/SonarQubeBlockerBugs

#507 SonarQube blocker severity bugs
This commit is contained in:
Ilkka Seppälä
2017-04-16 08:13:26 +03:00
committed by GitHub
7 changed files with 38 additions and 35 deletions

View File

@ -35,27 +35,27 @@ import org.slf4j.LoggerFactory;
public class ServiceExecutor implements Runnable {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
private final MessageQueue msgQueue;
public ServiceExecutor(MessageQueue msgQueue) {
this.msgQueue = msgQueue;
}
/**
* The ServiceExecutor thread will retrieve each message and process it.
*/
public void run() {
try {
while (true) {
while (!Thread.currentThread().isInterrupted()) {
Message msg = msgQueue.retrieveMsg();
if (null != msg) {
LOGGER.info(msg.toString() + " is served.");
} else {
LOGGER.info("Service Executor: Waiting for Messages to serve .. ");
}
Thread.sleep(1000);
}
} catch (InterruptedException ie) {