get rid of unused cached value

pull/62/head
Zlatin Balevsky 2021-06-05 22:16:49 +01:00
parent fe85887b39
commit 30abc5af8d
No known key found for this signature in database
GPG Key ID: A72832072D525E41
2 changed files with 1 additions and 7 deletions

View File

@ -138,7 +138,7 @@ abstract class BasePersisterService extends Service{
protected static toJson(SharedFile sf) {
def json = [:]
json.file = sf.getB64EncodedFileName()
json.file = Base64.encode(DataUtil.encodei18nString(sf.file.toString()))
json.length = sf.getCachedLength()
json.root = Base64.encode(sf.getRoot())
json.pieceSize = sf.getPieceSize()

View File

@ -27,7 +27,6 @@ public class SharedFile {
private final long cachedLength;
private String b64PathHash;
private final String b64EncodedFileName;
private volatile String comment;
private final Set<String> downloaders = Collections.synchronizedSet(new HashSet<>());
@ -42,7 +41,6 @@ public class SharedFile {
this.pieceSize = pieceSize;
this.cachedPath = file.getAbsolutePath();
this.cachedLength = file.length();
this.b64EncodedFileName = Base64.encode(DataUtil.encodei18nString(file.toString()));
}
public File getFile() {
@ -81,10 +79,6 @@ public class SharedFile {
return rv;
}
public String getB64EncodedFileName() {
return b64EncodedFileName;
}
public String getCachedPath() {
return cachedPath;
}