mirror of
https://github.com/revanced/jadb.git
synced 2024-11-19 10:39:23 +01:00
Fix: The diamond operator ("<>") should be used (squid:S2293)
This commit is contained in:
parent
17b93cb935
commit
f40d46917b
@ -74,7 +74,7 @@ public class JadbConnection implements ITransportFactory {
|
||||
|
||||
public List<JadbDevice> parseDevices(String body) {
|
||||
String[] lines = body.split("\n");
|
||||
ArrayList<JadbDevice> devices = new ArrayList<JadbDevice>(lines.length);
|
||||
ArrayList<JadbDevice> devices = new ArrayList<>(lines.length);
|
||||
for (String line : lines) {
|
||||
String[] parts = line.split("\t");
|
||||
if (parts.length > 1) {
|
||||
|
@ -151,7 +151,7 @@ public class JadbDevice {
|
||||
SyncTransport sync = transport.startSync();
|
||||
sync.send("LIST", remotePath);
|
||||
|
||||
List<RemoteFile> result = new ArrayList<RemoteFile>();
|
||||
List<RemoteFile> result = new ArrayList<>();
|
||||
for (RemoteFileRecord dent = sync.readDirectoryEntry(); dent != RemoteFileRecord.DONE; dent = sync.readDirectoryEntry()) {
|
||||
result.add(dent);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ public class LookBackFilteringOutputStream extends FilterOutputStream {
|
||||
{
|
||||
super(inner);
|
||||
this.lookBackBufferSize = lookBackBufferSize;
|
||||
this.buffer = new ArrayDeque<Byte>(lookBackBufferSize);
|
||||
this.buffer = new ArrayDeque<>(lookBackBufferSize);
|
||||
}
|
||||
|
||||
protected void unwrite() {
|
||||
|
@ -22,7 +22,7 @@ public class PackageManager {
|
||||
}
|
||||
|
||||
public List<Package> getPackages() throws IOException, JadbException {
|
||||
ArrayList<Package> result = new ArrayList<Package>();
|
||||
ArrayList<Package> result = new ArrayList<>();
|
||||
BufferedReader input = null;
|
||||
try {
|
||||
input = new BufferedReader(new InputStreamReader(device.executeShell("pm", "list", "packages"), Charset.forName("UTF-8")));
|
||||
|
Loading…
Reference in New Issue
Block a user