Fixes some warnings
This commit is contained in:
@ -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();
|
||||
|
@ -32,7 +32,7 @@ public final class OutputUtil {
|
||||
* @throws IOException <p>If a write is not possible.</p>
|
||||
*/
|
||||
public static void println(String input) throws IOException {
|
||||
if (!input.equals("")) {
|
||||
if (!input.isEmpty()) {
|
||||
writer.write(input);
|
||||
}
|
||||
println();
|
||||
|
@ -193,7 +193,7 @@ public final class Parser {
|
||||
* @return <p>True if the string builder is non empty.</p>
|
||||
*/
|
||||
private static boolean isNotEmpty(StringBuilder builder) {
|
||||
return !builder.toString().trim().equals("");
|
||||
return !builder.toString().trim().isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user