Adjust debug logging

This commit is contained in:
BoykoAlex
2022-05-10 22:23:19 -04:00
parent 679bbb950d
commit df8f3b01f5
2 changed files with 1 additions and 14 deletions

View File

@@ -77,13 +77,9 @@ public class BasicJandexIndex {
Tuple2<IJavaModuleData, ClassInfo> getClassByName(DotName fqName) {
for (ModuleJandexIndex m : modules) {
log.info("Looking for classpath container in module " + m.getModule() + " conatiner: " + m.getContainer());
log.info("Looking for classpath container for type " + (fqName == null ? "null" : fqName) + " conatiner: " + (m.getContainer() == null ? "null" : m.getContainer()));
IndexView indexView = m.getIndex().get();
if (indexView == null) {
log.info("No index for module " + m.getModule());
}
if (indexView != null) {
log.info("Index present for module " + m.getModule());
ClassInfo info = indexView.getClassByName(fqName);
if (info != null) {
log.info("Info found");
@@ -97,13 +93,7 @@ public class BasicJandexIndex {
}
public IJavaModuleData findClasspathResourceForType(String fqName) {
log.info("Computing classpath conatiner for " + fqName);
Tuple2<IJavaModuleData, ClassInfo> match = getClassByName(DotName.createSimple(fqName));
if (match == null) {
log.info("No match found");
} else {
log.info("Match found");
}
return match == null ? null : match.getT1();
}

View File

@@ -84,12 +84,9 @@ public interface SourceLinks {
public static Optional<URL> source(IJavaProject project, String fqName) {
// Try to find in a source JAR
log.info("Getting source URL for " + fqName + " project: " + project.getElementName());
IJavaModuleData classpathResourceContainer = project.getIndex().findClasspathResourceContainer(fqName);
if (classpathResourceContainer == null) {
log.info("No classpath resource container found!!!");
} else {
log.info("Classpath container found. " + classpathResourceContainer.getContainer());
}
if (classpathResourceContainer != null) {
Optional<URL> url = IClasspathUtil.sourceContainer(project.getClasspath(), classpathResourceContainer.getContainer()).map(file -> {