Skip to content

Commit

Permalink
Reversed weak relationship between IosHttpURLConnection and its deleg…
Browse files Browse the repository at this point in the history
…ate.

	Change on 2017/01/20 by tball <tball@google.com>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145113068
  • Loading branch information
tomball committed Jan 24, 2017
1 parent ae532f1 commit 9faa3a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -17,7 +17,6 @@

package com.google.j2objc.net;

import com.google.j2objc.annotations.Weak;
import com.google.j2objc.io.AsyncPipedNSInputStreamAdapter;
import java.io.FileNotFoundException;
import java.io.IOException;
Expand Down Expand Up @@ -102,7 +101,6 @@ public class IosHttpURLConnection extends HttpURLConnection {
private final Object getResponseLock = new Object();

// Delegate to handle native security data, to avoid a direct dependency on jre_security.
@Weak
private final SecurityDataHandler securityDataHandler;

private static final int NATIVE_PIPED_STREAM_BUFFER_SIZE = 8192;
Expand Down
Expand Up @@ -17,6 +17,7 @@

package com.google.j2objc.net;

import com.google.j2objc.annotations.RetainedWith;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -30,7 +31,6 @@
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;

import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLPeerUnverifiedException;

Expand All @@ -40,6 +40,10 @@
* whenever possible.
*/
public class IosHttpsURLConnection extends HttpsURLConnection implements SecurityDataHandler {

// TODO(tball): extract delegate code into separate private class, which both
// IosHttpURLConnection and this class use as a delegate.
@RetainedWith
private final IosHttpURLConnection delegate;
private final List<Certificate> serverCertificates = new ArrayList<>();

Expand Down

0 comments on commit 9faa3a3

Please sign in to comment.