Skip to content

Commit e53c5d0

Browse files
committed
polishing
1 parent eef3227 commit e53c5d0

File tree

11 files changed

+23
-409
lines changed

11 files changed

+23
-409
lines changed

client/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<parent>
66
<groupId>io.split.client</groupId>
77
<artifactId>java-client-parent</artifactId>
8-
<version>4.17.0-rc1</version>
8+
<version>4.17.0-rc2</version>
99
</parent>
10-
<version>4.17.0-rc1</version>
10+
<version>4.17.0-rc2</version>
1111
<artifactId>java-client</artifactId>
1212
<packaging>jar</packaging>
1313
<name>Java Client</name>
@@ -24,7 +24,7 @@
2424
<version>0.8.0</version>
2525
<extensions>true</extensions>
2626
<configuration>
27-
<ignorePublishedComponents>true</ignorePublishedComponents>
27+
<ignorePublishedComponents>false</ignorePublishedComponents>
2828
<publishingServerId>central</publishingServerId>
2929
<autoPublish>false</autoPublish>
3030
<waitUntil>published</waitUntil>

client/src/main/java/io/split/client/SplitClientConfig.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public class SplitClientConfig {
3636
public static final String TELEMETRY_ENDPOINT = "https://telemetry.split.io/api/v1";
3737

3838
public static class HttpScheme {
39+
private HttpScheme() {
40+
throw new IllegalStateException("Utility class");
41+
}
3942
public static final String HTTP = "http";
4043
public static final String HTTPS = "https";
4144
}
@@ -1177,10 +1180,8 @@ private void verifyProxy() {
11771180
throw new IllegalArgumentException("Proxy token and Proxy mTLS params are updated, set only one param.");
11781181
}
11791182

1180-
if (_proxyMtlsAuth != null) {
1181-
if (_proxyMtlsAuth.getP12File() == null || _proxyMtlsAuth.getP12FilePassKey() == null) {
1182-
throw new IllegalArgumentException("Proxy mTLS must have p12 file path and name, and pass phrase.");
1183-
}
1183+
if (_proxyMtlsAuth != null && (_proxyMtlsAuth.getP12File() == null || _proxyMtlsAuth.getP12FilePassKey() == null)) {
1184+
throw new IllegalArgumentException("Proxy mTLS must have p12 file path and name, and pass phrase.");
11841185
}
11851186
}
11861187

client/src/main/java/io/split/client/SplitFactoryImpl.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ public boolean isDestroyed() {
520520

521521
protected static SplitHttpClient buildSplitHttpClient(String apiToken, SplitClientConfig config,
522522
SDKMetadata sdkMetadata, RequestDecorator requestDecorator)
523-
throws URISyntaxException {
523+
throws URISyntaxException, IOException {
524524

525525
SSLContext sslContext = buildSSLContext(config);
526526

@@ -562,7 +562,7 @@ protected static SplitHttpClient buildSplitHttpClient(String apiToken, SplitClie
562562
}
563563

564564
private static CloseableHttpClient buildSSEdHttpClient(String apiToken, SplitClientConfig config,
565-
SDKMetadata sdkMetadata) {
565+
SDKMetadata sdkMetadata) throws IOException {
566566
RequestConfig requestConfig = RequestConfig.custom()
567567
.setConnectTimeout(Timeout.ofMilliseconds(SSE_CONNECT_TIMEOUT))
568568
.build();
@@ -597,13 +597,14 @@ private static CloseableHttpClient buildSSEdHttpClient(String apiToken, SplitCli
597597
return httpClientbuilder.build();
598598
}
599599

600-
private static SSLContext buildSSLContext(SplitClientConfig config) {
600+
private static SSLContext buildSSLContext(SplitClientConfig config) throws IOException {
601601
SSLContext sslContext;
602602
if (config.proxyMTLSAuth() != null) {
603603
_log.debug("Proxy setup using mTLS");
604+
InputStream keystoreStream = null;
604605
try {
605606
KeyStore keyStore = KeyStore.getInstance("PKCS12");
606-
InputStream keystoreStream = java.nio.file.Files.newInputStream(Paths.get(config.proxyMTLSAuth().getP12File()));
607+
keystoreStream = java.nio.file.Files.newInputStream(Paths.get(config.proxyMTLSAuth().getP12File()));
607608
keyStore.load(keystoreStream, config.proxyMTLSAuth().getP12FilePassKey().toCharArray());
608609
sslContext = SSLContexts.custom()
609610
.loadKeyMaterial(keyStore, config.proxyMTLSAuth().getP12FilePassKey().toCharArray())
@@ -612,6 +613,8 @@ private static SSLContext buildSSLContext(SplitClientConfig config) {
612613
_log.error("Exception caught while processing p12 file for Proxy mTLS auth: ", e);
613614
_log.warn("Ignoring p12 mTLS config and switching to default context");
614615
sslContext = SSLContexts.createSystemDefault();
616+
} finally {
617+
keystoreStream.close();
615618
}
616619
} else {
617620
sslContext = SSLContexts.createSystemDefault();

okhttp-modules/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<parent>
66
<artifactId>java-client-parent</artifactId>
77
<groupId>io.split.client</groupId>
8-
<version>4.17.0-rc1</version>
8+
<version>4.17.0-rc2</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
11-
<version>4.17.0-rc1</version>
11+
<version>4.17.0-rc2</version>
1212
<artifactId>okhttp-modules</artifactId>
1313
<packaging>jar</packaging>
1414
<name>http-modules</name>
@@ -25,7 +25,7 @@
2525
<version>0.8.0</version>
2626
<extensions>true</extensions>
2727
<configuration>
28-
<ignorePublishedComponents>true</ignorePublishedComponents>
28+
<ignorePublishedComponents>false</ignorePublishedComponents>
2929
<publishingServerId>central</publishingServerId>
3030
<autoPublish>false</autoPublish>
3131
<waitUntil>published</waitUntil>

pluggable-storage/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>java-client-parent</artifactId>
88
<groupId>io.split.client</groupId>
9-
<version>4.17.0-rc1</version>
9+
<version>4.17.0-rc2</version>
1010
</parent>
1111

1212
<version>2.1.0</version>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>io.split.client</groupId>
66
<artifactId>java-client-parent</artifactId>
7-
<version>4.17.0-rc1</version>
7+
<version>4.17.0-rc2</version>
88
<dependencyManagement>
99
<dependencies>
1010
<dependency>

redis-wrapper/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>java-client-parent</artifactId>
88
<groupId>io.split.client</groupId>
9-
<version>4.17.0-rc1</version>
9+
<version>4.17.0-rc2</version>
1010
</parent>
1111
<artifactId>redis-wrapper</artifactId>
1212
<version>3.1.1</version>

testing/.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.

testing/.github/linter/checkstyle-suppressions.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)