Skip to content

Commit 653d1ab

Browse files
committed
Full rename
1 parent 4f21600 commit 653d1ab

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/main/java/io/split/android/client/network/ProxySslSocketFactory.java renamed to src/main/java/io/split/android/client/network/ProxySslSocketFactoryProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import javax.net.ssl.SSLSocketFactory;
88

9-
interface ProxySslSocketFactory {
9+
interface ProxySslSocketFactoryProvider {
1010

1111
/**
1212
* Create an SSLSocketFactory for proxy connections using a CA certificate from an InputStream.

src/main/java/io/split/android/client/network/ProxySslSocketFactoryImpl.java renamed to src/main/java/io/split/android/client/network/ProxySslSocketFactoryProviderImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434

3535
import io.split.android.client.utils.logger.Logger;
3636

37-
class ProxySslSocketFactoryImpl implements ProxySslSocketFactory {
37+
class ProxySslSocketFactoryProviderImpl implements ProxySslSocketFactoryProvider {
3838

3939
private final Base64Decoder mBase64Decoder;
4040

41-
ProxySslSocketFactoryImpl() {
41+
ProxySslSocketFactoryProviderImpl() {
4242
this(new DefaultBase64Decoder());
4343
}
4444

45-
ProxySslSocketFactoryImpl(@NonNull Base64Decoder base64Decoder) {
45+
ProxySslSocketFactoryProviderImpl(@NonNull Base64Decoder base64Decoder) {
4646
mBase64Decoder = checkNotNull(base64Decoder);
4747
}
4848

src/test/java/io/split/android/client/network/ProxySslSocketFactoryImplTest.java renamed to src/test/java/io/split/android/client/network/ProxySslSocketFactoryProviderImplTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import okhttp3.tls.HeldCertificate;
1919

20-
public class ProxySslSocketFactoryImplTest {
20+
public class ProxySslSocketFactoryProviderImplTest {
2121

2222
@Rule
2323
public TemporaryFolder tempFolder = new TemporaryFolder();
@@ -36,9 +36,9 @@ public void creatingWithValidCaCertCreatesSocketFactory() throws Exception {
3636
try (FileWriter writer = new FileWriter(caCertFile)) {
3737
writer.write(ca.certificatePem());
3838
}
39-
ProxySslSocketFactoryImpl factory = getProxySslContextFactory();
39+
ProxySslSocketFactoryProviderImpl provider = getProvider();
4040
try (FileInputStream fis = new FileInputStream(caCertFile)) {
41-
SSLSocketFactory socketFactory = factory.create(fis);
41+
SSLSocketFactory socketFactory = provider.create(fis);
4242
assertNotNull(socketFactory);
4343
}
4444
}
@@ -49,9 +49,9 @@ public void creatingWithInvalidCaCertThrows() throws Exception {
4949
try (FileWriter writer = new FileWriter(caCertFile)) {
5050
writer.write("not a cert");
5151
}
52-
ProxySslSocketFactoryImpl factory = getProxySslContextFactory();
52+
ProxySslSocketFactoryProviderImpl provider = getProvider();
5353
try (FileInputStream fis = new FileInputStream(caCertFile)) {
54-
factory.create(fis);
54+
provider.create(fis);
5555
}
5656
}
5757

@@ -73,7 +73,7 @@ public void creatingWithValidMtlsParamsCreatesSocketFactory() throws Exception {
7373
}
7474

7575
// Create socket factory
76-
ProxySslSocketFactoryImpl factory = new ProxySslSocketFactoryImpl(mBase64Decoder);
76+
ProxySslSocketFactoryProviderImpl factory = new ProxySslSocketFactoryProviderImpl(mBase64Decoder);
7777
SSLSocketFactory sslSocketFactory;
7878
try (FileInputStream caCertStream = new FileInputStream(caCertFile);
7979
FileInputStream clientCertStream = new FileInputStream(clientCertFile);
@@ -100,11 +100,11 @@ public void creatingWithInvalidMtlsParamsThrows() throws Exception {
100100
writer.write("invalid key");
101101
}
102102

103-
ProxySslSocketFactoryImpl factory = getProxySslContextFactory();
103+
ProxySslSocketFactoryProviderImpl provider = getProvider();
104104
try (FileInputStream caCertStream = new FileInputStream(caCertFile);
105105
FileInputStream invalidClientCertStream = new FileInputStream(invalidClientCertFile);
106106
FileInputStream invalidClientKeyStream = new FileInputStream(invalidClientKeyFile)) {
107-
factory.create(caCertStream, invalidClientCertStream, invalidClientKeyStream);
107+
provider.create(caCertStream, invalidClientCertStream, invalidClientKeyStream);
108108
}
109109
}
110110

@@ -133,7 +133,7 @@ private static HeldCertificate getClientCert(HeldCertificate ca) {
133133
}
134134

135135
@NonNull
136-
private ProxySslSocketFactoryImpl getProxySslContextFactory() {
137-
return new ProxySslSocketFactoryImpl(mBase64Decoder);
136+
private ProxySslSocketFactoryProviderImpl getProvider() {
137+
return new ProxySslSocketFactoryProviderImpl(mBase64Decoder);
138138
}
139139
}

0 commit comments

Comments
 (0)