PT #164842647: Boot properties proposals in parallel

This commit is contained in:
BoykoAlex
2019-03-23 00:37:40 -04:00
parent ab2d26ce48
commit d45ee5c33d
3 changed files with 30 additions and 22 deletions

View File

@@ -18,7 +18,6 @@ import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -87,11 +86,11 @@ public class JdtLsIndex implements ClasspathIndex {
return typeCache.get(fqName, () -> {
JavaDataParams params = new JavaDataParams(projectUri.toString(), "L" + fqName.replace('.', '/') + ";", false);
try {
TypeData data = client.javaType(params).get(500, TimeUnit.MILLISECONDS);
TypeData data = client.javaType(params).get();
if (data != null) {
return Optional.ofNullable(toType(data));
}
} catch (InterruptedException | ExecutionException | TimeoutException e) {
} catch (InterruptedException | ExecutionException e) {
log.error("", e);
}
return Optional.empty();