mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 12:37:58 +01:00
FileTransfer: replace Error.none with null
This fixes an inconsistent representation of a 'no error' representation, that causes a file transfer in which not enough bytes were transferred to _not_ be marked as having a problem.
This commit is contained in:
parent
e117f431bc
commit
0ff8040895
1 changed files with 1 additions and 6 deletions
|
@ -215,7 +215,7 @@ public abstract class FileTransfer {
|
|||
}
|
||||
|
||||
// the connection was likely terminated abruptly if these are not equal
|
||||
if (!getStatus().equals(Status.cancelled) && getError() == Error.none
|
||||
if (!getStatus().equals(Status.cancelled) && getError() == null
|
||||
&& amountWritten != fileSize) {
|
||||
setStatus(Status.error);
|
||||
this.error = Error.connection;
|
||||
|
@ -313,11 +313,6 @@ public abstract class FileTransfer {
|
|||
|
||||
@SuppressWarnings("JavaLangClash")
|
||||
public enum Error {
|
||||
/**
|
||||
* No error.
|
||||
*/
|
||||
none("No error"),
|
||||
|
||||
/**
|
||||
* The peer did not find any of the provided stream mechanisms
|
||||
* acceptable.
|
||||
|
|
Loading…
Reference in a new issue