Source:
public Injector getObject() throws Exception { if ( this.injector != null ) { return injector; } try { cass.init(); logger.info( "Loading Core Persistence properties" ); String hostsString = ""; CassandraHost[] hosts = cass.getCassandraHostConfigurator().buildCassandraHosts(); if ( hosts.length == 0 ) { throw new RuntimeException( "Fatal error: no Cassandra hosts configured" ); } String sep = ""; for ( CassandraHost host : hosts ) { if ( StringUtils.isEmpty( host.getHost() ) ) { throw new RuntimeException( "Fatal error: Cassandra hostname cannot be empty" ); } hostsString = hostsString + sep + host.getHost(); sep = ","; } logger.info( "hostsString: " + hostsString ); Properties cpProps = new Properties(); cpProps.put( "cassandra.hosts", hostsString ); cpProps.put( "cassandra.port", hosts[0].getPort() ); cpProps.put( "cassandra.cluster_name", cass.getProperties().get( "cassandra.cluster" ) ); String cassRemoteString = ( String ) cass.getProperties().get( "cassandra.use_remote" ); if ( cassRemoteString != null && cassRemoteString.equals( "false" ) ) { cpProps.put( "cassandra.embedded", "true" ); } else { cpProps.put( "cassandra.embedded", "false" ); } cpProps.put( "collections.keyspace.strategy.class", cass.getProperties().get( "cassandra.keyspace.strategy" ) ); cpProps.put( "collections.keyspace.strategy.options", cass.getProperties().get( "cassandra.keyspace.replication" ) ); logger.debug( "Set Cassandra properties for Core Persistence: " + cpProps.toString() ); cpProps.putAll( cass.getProperties() ); cpProps.putAll( systemProperties ); ConfigurationManager.loadProperties( cpProps ); } catch ( Exception e ) { throw new RuntimeException( "Fatal error loading configuration.", e ); } injector = Guice.createInjector( new GuiceModule( applicationContext ) ); return injector; }

Target:
public Injector getObject() throws Exception { if ( this.injector != null ) { return injector; } try { logger.info( "Loading Core Persistence properties" ); String hostsString = ""; CassandraHost[] hosts = chc.buildCassandraHosts(); if ( hosts.length == 0 ) { throw new RuntimeException( "Fatal error: no Cassandra hosts configured" ); } String sep = ""; for ( CassandraHost host : hosts ) { if ( StringUtils.isEmpty( host.getHost() ) ) { throw new RuntimeException( "Fatal error: Cassandra hostname cannot be empty" ); } hostsString = hostsString + sep + host.getHost(); sep = ","; } logger.info( "hostsString: " + hostsString ); Properties cpProps = new Properties(); cpProps.put( "cassandra.hosts", hostsString ); cpProps.put( "cassandra.port", hosts[0].getPort() ); cpProps.put( "cassandra.cluster_name", systemProperties.getProperty( "cassandra.cluster" ) ); String cassRemoteString = ( String ) systemProperties.getProperty( "cassandra.use_remote" ); if ( cassRemoteString != null && cassRemoteString.equals( "false" ) ) { cpProps.put( "cassandra.embedded", "true" ); } else { cpProps.put( "cassandra.embedded", "false" ); } cpProps.put( "collections.keyspace.strategy.class", systemProperties.getProperty( "cassandra.keyspace.strategy" ) ); cpProps.put( "collections.keyspace.strategy.options", systemProperties.getProperty( "cassandra.keyspace.replication" ) ); logger.debug( "Set Cassandra properties for Core Persistence: " + cpProps.toString() ); cpProps.putAll( systemProperties ); ConfigurationManager.loadProperties( cpProps ); } catch ( Exception e ) { throw new RuntimeException( "Fatal error loading configuration.", e ); } injector = Guice.createInjector( new CoreModule( applicationContext ) ); return injector; }