Fixes some warnings

This commit is contained in:
2024-03-15 02:09:46 +01:00
parent 6c614b2f17
commit 692d9e79d2
8 changed files with 13 additions and 21 deletions

View File

@ -110,7 +110,7 @@ public final class FFMpegHelper {
StringBuilder output = new StringBuilder();
while (process.isAlive()) {
String read = readProcess(processReader, spacer);
if (!read.equals("")) {
if (!read.isEmpty()) {
if (write) {
OutputUtil.println(read);
} else {
@ -339,7 +339,7 @@ public final class FFMpegHelper {
private static String readProcess(BufferedReader reader, String spacer) throws IOException {
String line;
StringBuilder text = new StringBuilder();
while (reader.ready() && (line = reader.readLine()) != null && !line.equals("") && !line.equals("\n")) {
while (reader.ready() && (line = reader.readLine()) != null && !line.isEmpty() && !line.equals("\n")) {
text.append(line).append(spacer);
}
return text.toString().trim();