From 0c4d167fa9f734f9baf853512a74a08f3fa44c73 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 16 Dec 2021 09:52:43 +0100 Subject: Fix Java compiler warnings --- src/main/java/org/openslx/taskmanager/tasks/CopyDirectory.java | 9 +++++++-- src/main/java/org/openslx/taskmanager/tasks/DeleteDirectory.java | 1 - src/main/java/org/openslx/taskmanager/tasks/IrcNotification.java | 5 +++++ src/main/java/org/openslx/taskmanager/tasks/MakeTarball.java | 5 +++++ src/main/java/org/openslx/taskmanager/tasks/RemoteExec.java | 2 -- src/main/java/org/openslx/taskmanager/tasks/Symlink.java | 1 - 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/openslx/taskmanager/tasks/CopyDirectory.java b/src/main/java/org/openslx/taskmanager/tasks/CopyDirectory.java index 9bbeab7..4bd5669 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/CopyDirectory.java +++ b/src/main/java/org/openslx/taskmanager/tasks/CopyDirectory.java @@ -62,9 +62,14 @@ public class CopyDirectory extends AbstractTask return true; } - private class Output + public class Output { - public String error = null; + private String error = null; + + public String getError() + { + return this.error; + } } } diff --git a/src/main/java/org/openslx/taskmanager/tasks/DeleteDirectory.java b/src/main/java/org/openslx/taskmanager/tasks/DeleteDirectory.java index 1a0de05..afb92c5 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/DeleteDirectory.java +++ b/src/main/java/org/openslx/taskmanager/tasks/DeleteDirectory.java @@ -1,7 +1,6 @@ package org.openslx.taskmanager.tasks; import java.io.File; -import java.io.IOException; import java.util.Arrays; import org.apache.commons.io.FileUtils; diff --git a/src/main/java/org/openslx/taskmanager/tasks/IrcNotification.java b/src/main/java/org/openslx/taskmanager/tasks/IrcNotification.java index 92f29f4..ac0c6a1 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/IrcNotification.java +++ b/src/main/java/org/openslx/taskmanager/tasks/IrcNotification.java @@ -63,6 +63,11 @@ public class IrcNotification extends AbstractTask { this.messages += message + "\n"; } + + public String getMessages() + { + return this.messages; + } } } diff --git a/src/main/java/org/openslx/taskmanager/tasks/MakeTarball.java b/src/main/java/org/openslx/taskmanager/tasks/MakeTarball.java index c8d8bc1..bec2cdf 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/MakeTarball.java +++ b/src/main/java/org/openslx/taskmanager/tasks/MakeTarball.java @@ -78,6 +78,11 @@ public class MakeTarball extends AbstractTask static class Status { private String error; + + public String getError() + { + return this.error; + } } } diff --git a/src/main/java/org/openslx/taskmanager/tasks/RemoteExec.java b/src/main/java/org/openslx/taskmanager/tasks/RemoteExec.java index daec329..de520a8 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/RemoteExec.java +++ b/src/main/java/org/openslx/taskmanager/tasks/RemoteExec.java @@ -1,13 +1,11 @@ package org.openslx.taskmanager.tasks; import java.io.IOException; -import java.io.InputStreamReader; import java.io.OutputStream; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.CharsetDecoder; -import java.nio.charset.CoderResult; import java.nio.charset.CodingErrorAction; import java.nio.charset.StandardCharsets; import java.util.Map; diff --git a/src/main/java/org/openslx/taskmanager/tasks/Symlink.java b/src/main/java/org/openslx/taskmanager/tasks/Symlink.java index 3dfba02..f1b5db2 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/Symlink.java +++ b/src/main/java/org/openslx/taskmanager/tasks/Symlink.java @@ -5,7 +5,6 @@ import java.nio.file.Files; import java.nio.file.LinkOption; import java.nio.file.Paths; -import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.openslx.satserver.util.Util; import org.openslx.taskmanager.api.AbstractTask; -- cgit v1.2.3-55-g7522