Fix: The diamond operator ("<>") should be used (squid:S2293)

This commit is contained in:
Jano Svitok 2018-07-30 12:00:20 +02:00
parent 17b93cb935
commit f40d46917b
4 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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);
}

View File

@ -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() {

View File

@ -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")));