dependency 'com.eclipsesource.minimal-json:minimal-json:0.9.5'
dependency 'com.github.kevinsawicki:http-request:5.4.1'
dependency 'com.github.scribejava:scribejava-core:6.8.1'
- dependency 'com.github.scribejava:scribejava-apis:6.8.1'
+ dependency 'com.github.scribejava:scribejava-apis:6.8.1'
dependency 'com.googlecode.java-diff-utils:diffutils:1.2'
dependency('com.googlecode.json-simple:json-simple:1.1.1') {
exclude 'junit:junit'
}
dependency 'com.google.code.findbugs:jsr305:3.0.2'
dependency 'com.google.code.gson:gson:2.8.5'
- dependency 'com.google.guava:guava:18.0'
+ dependency 'com.google.guava:guava:28.1-jre'
dependency "com.google.protobuf:protobuf-java:${protobufVersion}"
dependency 'com.h2database:h2:1.3.176'
dependencySet(group: 'com.hazelcast', version: '3.12.1') {
dependency 'org.sonarsource.update-center:sonar-update-center-common:1.23.0.723'
dependency 'org.subethamail:subethasmtp:3.1.7'
dependency 'org.yaml:snakeyaml:1.17'
- dependency 'xml-apis:xml-apis:1.4.01'
+ dependency 'xml-apis:xml-apis:1.4.01'
// please keep this list alphabetically ordered
}
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
-import static org.assertj.guava.api.Assertions.assertThat;
import static org.sonar.api.measures.CoreMetrics.QUALITY_PROFILES;
import static org.sonar.api.measures.CoreMetrics.QUALITY_PROFILES_KEY;
import static org.sonar.ce.task.projectanalysis.component.Component.Type.DIRECTORY;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListenableScheduledFuture;
+import com.google.common.util.concurrent.MoreExecutors;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import javax.annotation.CheckForNull;
public void startScheduling() {
for (ChainingCallback chainingCallback : chainingCallbacks) {
ListenableScheduledFuture<CeWorker.Result> future = executorService.schedule(chainingCallback.worker, delayBetweenEnabledTasks, timeUnit);
- addCallback(future, chainingCallback);
+ addCallback(future, chainingCallback, MoreExecutors.directExecutor());
}
}
private void addCallback() {
if (workerFuture != null) {
- Futures.addCallback(workerFuture, this);
+ Futures.addCallback(workerFuture, this, MoreExecutors.directExecutor());
}
}
boolean connectedToOneHost = false;
for (HostAndPort hostAndPort : hostAndPorts) {
try {
- addTransportAddress(new TransportAddress(InetAddress.getByName(hostAndPort.getHostText()), hostAndPort.getPortOrDefault(9001)));
+ addTransportAddress(new TransportAddress(InetAddress.getByName(hostAndPort.getHost()), hostAndPort.getPortOrDefault(9001)));
connectedToOneHost = true;
} catch (UnknownHostException e) {
- LOG.debug("Can not resolve host [" + hostAndPort.getHostText() + "]", e);
+ LOG.debug("Can not resolve host [" + hostAndPort.getHost() + "]", e);
}
}
if (!connectedToOneHost) {
throw new IllegalStateException(format("Can not connect to one node from [%s]",
hostAndPorts.stream()
- .map(h -> format("%s:%d", h.getHostText(), h.getPortOrDefault(9001)))
+ .map(h -> format("%s:%d", h.getHost(), h.getPortOrDefault(9001)))
.collect(Collectors.joining(","))));
}
}
private static void addHostToClient(HostAndPort host, TransportClient client) {
try {
- client.addTransportAddress(new TransportAddress(InetAddress.getByName(host.getHostText()), host.getPortOrDefault(9001)));
+ client.addTransportAddress(new TransportAddress(InetAddress.getByName(host.getHost()), host.getPortOrDefault(9001)));
} catch (UnknownHostException e) {
throw new IllegalStateException("Can not resolve host [" + host + "]", e);
}