mirror of
https://github.com/revanced/jadb.git
synced 2025-05-17 06:27:06 +02:00
Fix: String function use should be optimized for single characters (squid:S3027)
This commit is contained in:
parent
23b4dd6b4d
commit
9b6074ce2d
@ -64,7 +64,7 @@ class HostConnectToRemoteTcpDevice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String extractError(String response) {
|
private String extractError(String response) {
|
||||||
int lastColon = response.lastIndexOf(":");
|
int lastColon = response.lastIndexOf(':');
|
||||||
if (lastColon != -1) {
|
if (lastColon != -1) {
|
||||||
return response.substring(lastColon, response.length());
|
return response.substring(lastColon, response.length());
|
||||||
} else {
|
} else {
|
||||||
|
@ -63,7 +63,7 @@ public class HostDisconnectFromRemoteTcpDevice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String extractError(String response) {
|
private String extractError(String response) {
|
||||||
int lastColon = response.lastIndexOf(":");
|
int lastColon = response.lastIndexOf(':');
|
||||||
if (lastColon != -1) {
|
if (lastColon != -1) {
|
||||||
return response.substring(lastColon, response.length());
|
return response.substring(lastColon, response.length());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user