From ebae1d002625b89664baca32f249d59b38694afb Mon Sep 17 00:00:00 2001 From: BoykoAlex Date: Mon, 23 Oct 2017 13:54:58 -0400 Subject: [PATCH] Adopt new reactor tuple implementation --- .../ide/vscode/commons/jandex/JandexIndex.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/headless-services/commons/commons-java/src/main/java/org/springframework/ide/vscode/commons/jandex/JandexIndex.java b/headless-services/commons/commons-java/src/main/java/org/springframework/ide/vscode/commons/jandex/JandexIndex.java index 43935a478..791416d2e 100644 --- a/headless-services/commons/commons-java/src/main/java/org/springframework/ide/vscode/commons/jandex/JandexIndex.java +++ b/headless-services/commons/commons-java/src/main/java/org/springframework/ide/vscode/commons/jandex/JandexIndex.java @@ -221,8 +221,9 @@ public class JandexIndex { // If not found look at indices owned by this // JandexIndex instance .orElseGet(() -> streamOfIndices() - .map(e -> Tuples.of(e.getT1(), e.getT2().getClassByName(fqName))) - .filter(e -> e.getT2() != null).map(e -> createType(e)).findFirst() + .map(e -> Tuples.of(e.getT1(), Optional.ofNullable(e.getT2().getClassByName(fqName)))) + .filter(t -> t.getT2().isPresent()) + .map(e -> createType(Tuples.of(e.getT1(), e.getT2().get()))).findFirst() .orElse(null)); }