Fix potential crashes
This commit is contained in:
parent
29449d6168
commit
e2bfbc0ab2
|
@ -1646,15 +1646,11 @@ public class HttpsConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String converToString(InputStream inputStream) throws IOException {
|
private String converToString(InputStream inputStream) throws IOException {
|
||||||
BufferedReader r = new BufferedReader(new InputStreamReader(inputStream));
|
java.util.Scanner s = new java.util.Scanner(inputStream).useDelimiter("\\A");
|
||||||
StringBuilder total = new StringBuilder(inputStream.available());
|
return s.hasNext() ? s.next() : "";
|
||||||
String line;
|
|
||||||
while ((line = r.readLine()) != null) {
|
|
||||||
total.append(line).append('\n');
|
|
||||||
}
|
|
||||||
return total.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int getActionCode() {
|
int getActionCode() {
|
||||||
if( Helper.getLiveInstanceWithProtocol(context).startsWith("https://")) {
|
if( Helper.getLiveInstanceWithProtocol(context).startsWith("https://")) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue