forked from Qortal/qortal
Rework of DataFile.base58Digest()
This fixes an NPE when trying to send a file that doesn't exist. It also removes the caching, which we can add again later if it turns out to be needed.
This commit is contained in:
parent
5070c4eea9
commit
7e9b1d5e16
@ -49,7 +49,6 @@ public class DataFile {
|
|||||||
|
|
||||||
protected String filePath;
|
protected String filePath;
|
||||||
private ArrayList<DataFileChunk> chunks;
|
private ArrayList<DataFileChunk> chunks;
|
||||||
protected String base58Digest;
|
|
||||||
|
|
||||||
public DataFile() {
|
public DataFile() {
|
||||||
}
|
}
|
||||||
@ -315,10 +314,10 @@ public class DataFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String base58Digest() {
|
public String base58Digest() {
|
||||||
if (this.base58Digest == null) {
|
if (this.digest() != null) {
|
||||||
this.base58Digest = Base58.encode(this.digest());
|
return Base58.encode(this.digest());
|
||||||
}
|
}
|
||||||
return this.base58Digest;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String shortDigest() {
|
public String shortDigest() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user