Source:
Configuration(Builder builder) { this.uri = builder.uri; this.uris = builder.uris; this.connectionPoolSize = builder.connectionPoolSize != null ? builder.connectionPoolSize : 50; this.encryptionLevel = builder.encryptionLevel; this.trustStrategy = builder.trustStrategy; this.trustCertFile = builder.trustCertFile; this.connectionLivenessCheckTimeout = builder.connectionLivenessCheckTimeout; this.verifyConnection = builder.verifyConnection != null ? builder.verifyConnection : false; this.autoIndex = builder.autoIndex != null ? AutoIndexMode.fromString(builder.autoIndex) : AutoIndexMode.NONE; this.generatedIndexesOutputDir = builder.generatedIndexesOutputDir != null ? builder.generatedIndexesOutputDir : "."; this.generatedIndexesOutputFilename = builder.generatedIndexesOutputFilename != null ? builder.generatedIndexesOutputFilename : "generated_indexes.cql"; this.neo4jConfLocation = builder.neo4jConfLocation; this.customProperties = builder.customProperties; this.useNativeTypes = builder.useNativeTypes; this.basePackages = builder.basePackages; if (this.uri != null) { java.net.URI parsedUri = null; try { parsedUri = new URI(this.uri); } catch (URISyntaxException e) { throw new RuntimeException("Could not configure supplied URI in Configuration", e); } String userInfo = parsedUri.getUserInfo(); if (userInfo != null) { String[] userPass = userInfo.split(":"); credentials = new UsernamePasswordCredentials(userPass[0], userPass[1]); this.uri = parsedUri.toString().replace(parsedUri.getUserInfo() + "@", ""); } if (getDriverClassName() == null) { this.driverName = Drivers.getDriverFor(parsedUri.getScheme()).driverClassName(); } } else { this.driverName = Drivers.EMBEDDED.driverClassName(); } if (builder.username != null && builder.password != null) { if (this.credentials != null) { LOGGER.warn("Overriding credentials supplied in URI with supplied username and password."); } credentials = new UsernamePasswordCredentials(builder.username, builder.password); } }

Target:
Configuration(Builder builder) { this.uri = builder.uri; this.uris = builder.uris; this.connectionPoolSize = builder.connectionPoolSize != null ? builder.connectionPoolSize : 50; this.encryptionLevel = builder.encryptionLevel; this.trustStrategy = builder.trustStrategy; this.trustCertFile = builder.trustCertFile; this.connectionLivenessCheckTimeout = builder.connectionLivenessCheckTimeout; this.verifyConnection = builder.verifyConnection != null ? builder.verifyConnection : false; this.autoIndex = builder.autoIndex != null ? AutoIndexMode.fromString(builder.autoIndex) : AutoIndexMode.NONE; this.generatedIndexesOutputDir = builder.generatedIndexesOutputDir != null ? builder.generatedIndexesOutputDir : "."; this.generatedIndexesOutputFilename = builder.generatedIndexesOutputFilename != null ? builder.generatedIndexesOutputFilename : "generated_indexes.cql"; this.neo4jConfLocation = builder.neo4jConfLocation; this.customProperties = builder.customProperties; this.useNativeTypes = builder.useNativeTypes; this.basePackages = builder.basePackages; if (this.uri != null) { URI parsedUri = null; try { parsedUri = new URI(this.uri); } catch (URISyntaxException e) { throw new RuntimeException("Could not configure supplied URI in Configuration", e); } String userInfo = parsedUri.getUserInfo(); if (userInfo != null) { String[] userPass = userInfo.split(":"); credentials = new UsernamePasswordCredentials(userPass[0], userPass[1]); this.uri = parsedUri.toString().replace(parsedUri.getUserInfo() + "@", ""); } if (getDriverClassName() == null) { this.driverName = Drivers.getDriverFor(parsedUri.getScheme()).driverClassName(); } } else { this.driverName = Drivers.EMBEDDED.driverClassName(); } if (builder.username != null && builder.password != null) { if (this.credentials != null) { LOGGER.warn("Overriding credentials supplied in URI with supplied username and password."); } credentials = new UsernamePasswordCredentials(builder.username, builder.password); } }