equal
deleted
inserted
replaced
29 import java.io.InputStream; |
29 import java.io.InputStream; |
30 import java.io.OutputStream; |
30 import java.io.OutputStream; |
31 import java.util.Objects; |
31 import java.util.Objects; |
32 import java.util.Set; |
32 import java.util.Set; |
33 |
33 |
34 import sun.net.TrustedSocketImpl; |
34 import sun.net.PlatformSocketImpl; |
35 |
35 |
36 /** |
36 /** |
37 * A SocketImpl that delegates all methods to another SocketImpl. |
37 * A SocketImpl that delegates all methods to another SocketImpl. |
38 */ |
38 */ |
39 |
39 |
40 class DelegatingSocketImpl extends SocketImpl { |
40 class DelegatingSocketImpl extends SocketImpl { |
41 protected final SocketImpl delegate; |
41 protected final SocketImpl delegate; |
42 |
42 |
43 DelegatingSocketImpl(SocketImpl delegate) { |
43 DelegatingSocketImpl(SocketImpl delegate) { |
44 assert delegate instanceof TrustedSocketImpl; |
44 assert delegate instanceof PlatformSocketImpl; |
45 this.delegate = Objects.requireNonNull(delegate); |
45 this.delegate = Objects.requireNonNull(delegate); |
46 } |
46 } |
47 |
47 |
48 final SocketImpl delegate() { |
48 final SocketImpl delegate() { |
49 return delegate; |
49 return delegate; |