@Test public void testGetLibraryInfoForFakeJDKWithoutJavaExecutable() throws Exception { JdkLibraryInfoProviderStub libInfoProvider = new JdkLibraryInfoProviderStub( new File("../tycho-lib-detector/target/classes/"), new SilentLog()); LibraryInfo libInfo = libInfoProvider .getLibraryInfo(new File("src/test/resources/testJavaHome").getAbsolutePath()); assertEquals("unknown", libInfo.getVersion()); String[] bootpath = libInfo.getBootpath(); assertEquals(2, bootpath.length); assertTrue(bootpath[0].endsWith("lib" + File.separator + "some.jar")); assertTrue(bootpath[1].endsWith("lib" + File.separator + "ext" + File.separator + "another.jar")); assertArrayEquals(new String[0], libInfo.getEndorsedDirs()); assertArrayEquals(new String[0], libInfo.getExtensionDirs()); }
public LibraryInfo getLibraryInfo(String javaHome) { LibraryInfo libInfo = libraryInfoCache.get(javaHome); if (libInfo == null) { libInfo = generateLibraryInfo(javaHome); libraryInfoCache.put(javaHome, libInfo); } return libInfo; }
JdkLibraryInfoProvider { public LibraryInfo getLibraryInfo(String javaHome) { LibraryInfo libInfo = libraryInfoCache.get(javaHome); if (libInfo == null) { libInfo = generateLibraryInfo(javaHome); libraryInfoCache.put(javaHome, libInfo); } return libInfo; } }
JdkLibraryInfoProvider { public LibraryInfo getLibraryInfo(String javaHome) { LibraryInfo libInfo = libraryInfoCache.get(javaHome); if (libInfo == null) { libInfo = generateLibraryInfo(javaHome); libraryInfoCache.put(javaHome, libInfo); } return libInfo; }  }
JdkLibraryInfoProvider { public LibraryInfo getLibraryInfo(String javaHome) { LibraryInfo libInfo = libraryInfoCache.get(javaHome); if (libInfo == null) { libInfo = generateLibraryInfo(javaHome); libraryInfoCache.put(javaHome, libInfo); } return libInfo; }  LibraryInfo getLibraryInfo(String javaHome); }
JdkLibraryInfoProvider { public LibraryInfo getLibraryInfo(String javaHome) { LibraryInfo libInfo = libraryInfoCache.get(javaHome); if (libInfo == null) { libInfo = generateLibraryInfo(javaHome); libraryInfoCache.put(javaHome, libInfo); } return libInfo; }  LibraryInfo getLibraryInfo(String javaHome);  }