Source:
<code>private static AmazonS3 getClient(String driverId) { if(driverClientMap.containsKey(driverId)) { return driverClientMap.get(driverId); } else { AmazonS3ClientBuilder s3CB = AmazonS3ClientBuilder.standard(); ClientConfiguration cc = new ClientConfiguration(); <START> Integer poolSize = Integer.getInteger("dataverse.files." + driverId + ".connection-pool-size"); <END> if(poolSize==null) { poolSize = 256; } cc.setMaxConnections(poolSize); s3CB.setClientConfiguration(cc); String s3CEUrl = System.getProperty("dataverse.files." + driverId + ".custom-endpoint-url", ""); String s3CERegion = System.getProperty("dataverse.files." + driverId + ".custom-endpoint-region", "dataverse"); if (!s3CEUrl.isEmpty()) { s3CB.setEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(s3CEUrl, s3CERegion)); } Boolean s3pathStyleAccess = Boolean.parseBoolean(System.getProperty("dataverse.files." + driverId + ".path-style-access", "false")); s3CB.withPathStyleAccessEnabled(s3pathStyleAccess); Boolean s3payloadSigning = Boolean.parseBoolean(System.getProperty("dataverse.files." + driverId + ".payload-signing","false")); Boolean s3chunkedEncoding = Boolean.parseBoolean(System.getProperty("dataverse.files." + driverId + ".chunked-encoding","true")); s3CB.setPayloadSigningEnabled(s3payloadSigning); s3CB.setChunkedEncodingDisabled(!s3chunkedEncoding); String s3profile = System.getProperty("dataverse.files." + driverId + ".profile","default"); s3CB.setCredentials(new ProfileCredentialsProvider(s3profile)); AmazonS3 client = s3CB.build(); driverClientMap.put(driverId, client); return client; } }</code><technical_language>this simplified a little: public static Integer getInteger(String nm, int val) val is default (so null check needed)</technical_language>

Target:
private static AmazonS3 getClient(String driverId) { if(driverClientMap.containsKey(driverId)) { return driverClientMap.get(driverId); } else { AmazonS3ClientBuilder s3CB = AmazonS3ClientBuilder.standard(); ClientConfiguration cc = new ClientConfiguration(); Integer poolSize = Integer.getInteger("dataverse.files." + driverId + ".connection-pool-size", 256); cc.setMaxConnections(poolSize); s3CB.setClientConfiguration(cc); String s3CEUrl = System.getProperty("dataverse.files." + driverId + ".custom-endpoint-url", ""); String s3CERegion = System.getProperty("dataverse.files." + driverId + ".custom-endpoint-region", "dataverse"); if (!s3CEUrl.isEmpty()) { s3CB.setEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(s3CEUrl, s3CERegion)); } Boolean s3pathStyleAccess = Boolean.parseBoolean(System.getProperty("dataverse.files." + driverId + ".path-style-access", "false")); s3CB.withPathStyleAccessEnabled(s3pathStyleAccess); Boolean s3payloadSigning = Boolean.parseBoolean(System.getProperty("dataverse.files." + driverId + ".payload-signing","false")); Boolean s3chunkedEncoding = Boolean.parseBoolean(System.getProperty("dataverse.files." + driverId + ".chunked-encoding","true")); s3CB.setPayloadSigningEnabled(s3payloadSigning); s3CB.setChunkedEncodingDisabled(!s3chunkedEncoding); String s3profile = System.getProperty("dataverse.files." + driverId + ".profile","default"); s3CB.setCredentials(new ProfileCredentialsProvider(s3profile)); AmazonS3 client = s3CB.build(); driverClientMap.put(driverId, client); return client; } }