Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ public MicroProfileProjectInfo getMicroProfileProjectInfo(Module module,
if (query != null) {
try {
beginSearch(context, monitor);
query.forEach((Consumer<? super PsiModifierListOwner>) psiMember -> collectProperties(psiMember, context, monitor));
for (PsiModifierListOwner psiMember : query.findAll()) {
collectProperties(psiMember, context, monitor);
}
}
finally {
endSearch(context, monitor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ private static String findApplicationPath(PsiClass annotationType, Module javaPr

Query<PsiClass> pattern = AnnotatedElementsSearch.searchElements(annotationType, javaProject.getModuleWithDependenciesScope(),
PsiClass.class);
pattern.forEach((Consumer<? super PsiClass>) match -> collectApplicationPath(match, applicationPathRef));
for (PsiClass match : pattern.findAll()) {
collectApplicationPath(match, applicationPathRef);
}
return applicationPathRef.get();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ public Set<PsiClass> getAllJaxRsClasses(Module javaProject, IPsiUtils utils, Pro
}

Set<PsiClass> jaxRsClasses = new HashSet<>();
query.forEach((Consumer<? super PsiModifierListOwner>) item -> {
for (PsiModifierListOwner item : query.findAll()) {
if (item instanceof PsiMember) {
PsiClass cl = ((PsiMember) item).getContainingClass();
if (cl != null) {
jaxRsClasses.add(cl);
}
}
});
}
if (monitor.isCanceled()) {
return Collections.emptySet();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private static void validateInterfaceType(PsiClass interfaceType, List<Diagnosti

final AtomicInteger nbReferences = new AtomicInteger(0);
Query<PsiReference> query = ReferencesSearch.search(interfaceType, createSearchScope(context.getJavaProject()));
query.forEach(match -> {
for (PsiReference match : query.findAll()) {
PsiField field = PsiTreeUtil.getParentOfType(match.getElement(), PsiField.class);
if (field != null) {
boolean hasInjectAnnotation = AnnotationUtils.hasAnyAnnotation(field, INJECT_JAVAX_ANNOTATION, INJECT_JAKARTA_ANNOTATION);
Expand All @@ -213,7 +213,7 @@ private static void validateInterfaceType(PsiClass interfaceType, List<Diagnosti
nbReferences.incrementAndGet();
}
}
});
}

if (nbReferences.get() > 0) {
String uri = context.getUri();
Expand Down
Loading