Toggle navigation
Home
com.google.common.base.Optional to java.util.Optional
No. of Instances - 4
No. of Commits - 2
No. of Projects - {'Singularity'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: External -> Jdk
Mapping:
Add or Remove Method invocation
guava.orNull()
to
guava.orElse(null)
Optional.fromNullable(brokerList).transform(new Function<List<String>,ImmutableMap<String,Object>>(){ @Nullable @Override public ImmutableMap<String,Object> apply( List<String> input){ return ImmutableMap.<String,Object>builder().put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,Joiner.on(',').join(input)).put(ProducerConfig.CLIENT_ID_CONFIG,KAFKA_HELIOS_CLIENT_ID).put(ProducerConfig.ACKS_CONFIG,KAFKA_QUORUM_PARAMETER).put(ProducerConfig.METADATA_FETCH_TIMEOUT_CONFIG,MAX_BLOCK_TIMEOUT).put(ProducerConfig.BLOCK_ON_BUFFER_FULL_CONFIG,false).build(); } } )
to
Optional.ofNullable(brokerList).map(input -> ImmutableMap.<String,Object>builder().put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,Joiner.on(',').join(input)).put(ProducerConfig.CLIENT_ID_CONFIG,KAFKA_HELIOS_CLIENT_ID).put(ProducerConfig.ACKS_CONFIG,KAFKA_QUORUM_PARAMETER).put(ProducerConfig.METADATA_FETCH_TIMEOUT_CONFIG,MAX_BLOCK_TIMEOUT).put(ProducerConfig.BLOCK_ON_BUFFER_FULL_CONFIG,false).build())
port.or(defaultPort.get())
to
port.orElse(defaultPort.get())
branchComponentDtoOpt.or(() -> insertIntoProjectsTable(dbSession,branchUuid))
to
branchComponentDtoOpt.orElseGet(() -> insertIntoProjectsTable(dbSession,branchUuid))
Other
scmInfoCache.computeIfAbsent(component,this::getScmInfoForComponent)
to
scmInfoCache.computeIfAbsent(component,this::getScmInfoForComponent)