Code cleanup

This commit is contained in:
0xb00bface 2021-12-21 15:58:43 +01:00
parent e0426d7c86
commit 3c145f4924
1 changed files with 5 additions and 11 deletions

View File

@ -56,7 +56,7 @@ public class Recording implements Serializable, Callable<Recording> {
WAITING("waiting"),
FAILED("failed");
private String desc;
private final String desc;
State(String desc) {
this.desc = desc;
@ -123,10 +123,8 @@ public class Recording implements Serializable, Callable<Recording> {
String recordingsDir = Config.getInstance().getSettings().recordingsDir;
File recordingsFile = new File(recordingsDir, path);
absoluteFile = recordingsFile;
return absoluteFile;
} else {
return absoluteFile;
}
return absoluteFile;
}
public void setAbsoluteFile(File absoluteFile) {
@ -237,15 +235,11 @@ public class Recording implements Serializable, Callable<Recording> {
return true;
if (obj == null)
return false;
if (!(obj instanceof Recording))
if (!(obj instanceof Recording other))
return false;
Recording other = (Recording) obj;
if (getId() == null) {
if (other.getId() != null)
return false;
} else if (!getId().equals(other.getId()))
return false;
return true;
return other.getId() == null;
} else return getId().equals(other.getId());
}
@Override