Debugging broken build

This commit is contained in:
BoykoAlex
2018-11-07 18:31:39 -05:00
parent 28793153e1
commit 1abefb76c3
2 changed files with 11 additions and 7 deletions

View File

@@ -40,7 +40,8 @@ public class BootProjectUtil {
}
public static Path javaHomeFromLibJar(Path libJar) {
for (Path home = libJar; home.getParent() != null; home = home.getParent()) {
Path root = libJar.getRoot();
for (Path home = libJar; !root.equals(home.getParent()); home = home.getParent()) {
Path bin = home.resolve("bin");
Path lib = home.resolve("lib");
Path include = home.resolve("include");
@@ -53,9 +54,12 @@ public class BootProjectUtil {
}
public static Path jreSources(Path libJar) {
System.out.println("LIB JAR: " + libJar);
Path home = javaHomeFromLibJar(libJar);
if (home != null) {
System.out.println("Trying java-home " + home);
Path sources = home.resolve("src.zip");
System.out.println("Trying sources: " + sources);
if (Files.exists(sources)) {
System.out.println("Found " + sources);
return sources;

View File

@@ -67,9 +67,9 @@ public class JavaIndexTest {
.collectSortedList((o1, o2) -> o2.getT2().compareTo(o1.getT2()))
.block();
assertTrue(results.size() > 10);
results.forEach(res -> {
System.out.println("Found type: " + res.getT1());
});
// results.forEach(res -> {
// System.out.println("Found type: " + res.getT1());
// });
IType type = results.get(0).getT1();
System.out.println(type.getFullyQualifiedName() + ": " + type.getBindingKey());
assertEquals("java.util.Map", type.getFullyQualifiedName());
@@ -83,9 +83,9 @@ public class JavaIndexTest {
.collectSortedList((o1, o2) -> o2.getT2().compareTo(o1.getT2()))
.block();
assertTrue(results.size() > 10);
results.forEach(res -> {
System.out.println("Found type: " + res.getT1());
});
// results.forEach(res -> {
// System.out.println("Found type: " + res.getT1());
// });
IType type = results.get(0).getT1();
System.out.println(type.getFullyQualifiedName() + ": " + type.getBindingKey());
assertEquals("java.util.EnumMap$KeySet", type.getFullyQualifiedName());