Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static int getNumberCPUCores() {
* Returns the total size of the disk. Assumes that it's a UNIX style filesystem. Will not work
* in Windows.
*
* @return
* @return total disk size in bytes
*/
public static long getSizeOfDisk() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ public class MantisAgent implements Service {
private CountDownLatch blockUntilShutdown = new CountDownLatch(1);

public MantisAgent() {
Thread t = new Thread() {
@Override
public void run() {
shutdown();
}
};
Thread t = new Thread(this::shutdown);
t.setDaemon(true);
// shutdown hook
Runtime.getRuntime().addShutdownHook(t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ public void onTaskCancelled(RuntimeTask task, @Nullable Throwable throwable) {
}

private static ListenerCallQueue.Event<Listener> getTaskStartingEvent(RuntimeTask task) {
return new ListenerCallQueue.Event<Listener>() {
return new ListenerCallQueue.Event<>() {
@Override
public void call(Listener listener) {
listener.onTaskStarting(task);
Expand All @@ -657,7 +657,7 @@ public String toString() {
}

private static ListenerCallQueue.Event<Listener> getTaskCancellingEvent(RuntimeTask task) {
return new ListenerCallQueue.Event<Listener>() {
return new ListenerCallQueue.Event<>() {
@Override
public void call(Listener listener) {
listener.onTaskCancelling(task);
Expand All @@ -671,7 +671,7 @@ public String toString() {
}

private static ListenerCallQueue.Event<Listener> getTaskFailedEvent(RuntimeTask task, Throwable throwable) {
return new ListenerCallQueue.Event<Listener>() {
return new ListenerCallQueue.Event<>() {
@Override
public void call(Listener listener) {
listener.onTaskFailed(task, throwable);
Expand All @@ -685,7 +685,7 @@ public String toString() {
}

private static ListenerCallQueue.Event<Listener> getTaskCancelledEvent(RuntimeTask task, @Nullable Throwable throwable) {
return new ListenerCallQueue.Event<Listener>() {
return new ListenerCallQueue.Event<>() {
@Override
public void call(Listener listener) {
listener.onTaskCancelled(task, throwable);
Expand Down