From 11363adedb00211c321ba7ed2db8dd1fcc2421c9 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Tue, 25 Apr 2017 12:31:04 +0200 Subject: [PATCH] Clean up after CR --- .../lib/common/network/AdvancedSslSocketFactory.java | 8 ++++---- .../lib/resources/files/DownloadRemoteFileOperation.java | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/com/owncloud/android/lib/common/network/AdvancedSslSocketFactory.java b/src/com/owncloud/android/lib/common/network/AdvancedSslSocketFactory.java index 898b8f43..873ec656 100644 --- a/src/com/owncloud/android/lib/common/network/AdvancedSslSocketFactory.java +++ b/src/com/owncloud/android/lib/common/network/AdvancedSslSocketFactory.java @@ -229,9 +229,9 @@ public class AdvancedSslSocketFactory implements SecureProtocolSocketFactory { /** * Verifies the identity of the server. - *

+ * * The server certificate is verified first. - *

+ * * Then, the host name is compared with the content of the server certificate using the current host name verifier, * if any. * @@ -325,10 +325,10 @@ public class AdvancedSslSocketFactory implements SecureProtocolSocketFactory { /** * Grants that all protocols supported by the Security Provider in mSslContext are enabled in socket. - *

+ * * Grants also that no unsupported protocol is tried to be enabled. That would trigger an exception, breaking * the connection process although some protocols are supported. - *

+ * * This is not cosmetic: not all the supported protocols are enabled by default. Too see an overview of * supported and enabled protocols in the stock Security Provider in Android see the tables in * http://developer.android.com/reference/javax/net/ssl/SSLSocket.html. diff --git a/src/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.java b/src/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.java index 4974710a..31bac898 100644 --- a/src/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.java +++ b/src/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.java @@ -166,14 +166,10 @@ public class DownloadRemoteFileOperation extends RemoteOperation { } else if (status != FORBIDDEN_ERROR && status != SERVICE_UNAVAILABLE_ERROR) { client.exhaustResponse(mGet.getResponseBodyAsStream()); - } // else, body read by RemoteOeprationResult constructor + } // else, body read by RemoteOperationResult constructor result = new RemoteOperationResult(isSuccess(status), mGet); - /*} catch (Exception e) { - client.exhaustResponse(mGet.getResponseBodyAsStream()); - throw e;*/ - } finally { if (fos != null) fos.close(); if (bis != null) bis.close();