mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 17:46:47 +01:00
Fixing a bug where strings where sometimes not read completely during sync. Removing some IntellJ warnings.
This commit is contained in:
parent
0bc737adab
commit
6b8c330195
@ -29,7 +29,7 @@ class SyncTransport {
|
|||||||
|
|
||||||
private String readString(int length) throws IOException {
|
private String readString(int length) throws IOException {
|
||||||
byte[] buffer = new byte[length];
|
byte[] buffer = new byte[length];
|
||||||
input.read(buffer);
|
input.readFully(buffer);
|
||||||
return new String(buffer, Charset.forName("utf-8"));
|
return new String(buffer, Charset.forName("utf-8"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ class SyncTransport {
|
|||||||
int mode = readInt();
|
int mode = readInt();
|
||||||
int size = readInt();
|
int size = readInt();
|
||||||
int time = readInt();
|
int time = readInt();
|
||||||
int nameLenght = readInt();
|
int nameLength = readInt();
|
||||||
String name = readString(nameLenght);
|
String name = readString(nameLength);
|
||||||
|
|
||||||
if ("DENT".equals(id) == false) return RemoteFile.DONE;
|
if (!"DENT".equals(id)) return RemoteFile.DONE;
|
||||||
return new RemoteFile(id, name, mode, size, time);
|
return new RemoteFile(id, name, mode, size, time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user