mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 17:46:47 +01:00
Refactor: Fixing some code issues found by IntelliJ
This commit is contained in:
parent
77814e09d4
commit
31456f7a36
@ -5,8 +5,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JadbDevice {
|
public class JadbDevice {
|
||||||
private String serial;
|
private final String serial;
|
||||||
private Transport transport;
|
private final Transport transport;
|
||||||
private boolean selected = false;
|
private boolean selected = false;
|
||||||
|
|
||||||
JadbDevice(String serial, String type, Transport transport) {
|
JadbDevice(String serial, String type, Transport transport) {
|
||||||
|
@ -9,7 +9,7 @@ import java.net.ProtocolException;
|
|||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
public class AdbProtocolHandler implements Runnable {
|
class AdbProtocolHandler implements Runnable {
|
||||||
private final Socket socket;
|
private final Socket socket;
|
||||||
private final AdbResponder responder;
|
private final AdbResponder responder;
|
||||||
private AdbDeviceResponder selected;
|
private AdbDeviceResponder selected;
|
||||||
|
@ -8,7 +8,7 @@ import java.net.Socket;
|
|||||||
public class AdbServer extends SocketServer {
|
public class AdbServer extends SocketServer {
|
||||||
|
|
||||||
public static final int DEFAULT_PORT = 15037;
|
public static final int DEFAULT_PORT = 15037;
|
||||||
private AdbResponder responder;
|
private final AdbResponder responder;
|
||||||
|
|
||||||
public AdbServer(AdbResponder responder)
|
public AdbServer(AdbResponder responder)
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ public abstract class SocketServer implements Runnable {
|
|||||||
private Thread thread;
|
private Thread thread;
|
||||||
private final Object lockObject = new Object();
|
private final Object lockObject = new Object();
|
||||||
|
|
||||||
public SocketServer(int port)
|
protected SocketServer(int port)
|
||||||
{
|
{
|
||||||
this.port = port;
|
this.port = port;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ public class FakeAdbServer implements AdbResponder {
|
|||||||
this.content = content.getBytes(Charset.forName("utf-8"));
|
this.content = content.getBytes(Charset.forName("utf-8"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(RemoteFile path) throws JadbException {
|
public boolean matches(RemoteFile path) {
|
||||||
return this.path.equals(path);
|
return this.path.equals(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user