@Override public List<ScanResult> scan() { String javaClassPath = AccessController.doPrivileged(new GetSystemPropertyAction(JAVA_CLASS_PATH_SYSTEM_PROPERTY)); if (javaClassPath == null) { throw CommonLogger.LOG.cannotReadJavaClassPathSystemProperty(); } ImmutableList.Builder<ScanResult> results = ImmutableList.builder(); Set<String> entries = ImmutableSet.of(javaClassPath.split(Pattern.quote(File.pathSeparator))); logger.debugv("Scanning class path entries: {0}", entries); for (String entry : entries) { if (entry == null || entry.isEmpty()) { continue; } File entryFile = new File(entry); if (!entryFile.canRead()) { throw CommonLogger.LOG.cannotReadClassPathEntry(entryFile); } try { if (entryFile.isDirectory()) { scanDirectory(entryFile, results); } else { scanJarFile(entryFile, results); } } catch (IOException e) { throw CommonLogger.LOG.cannotScanClassPathEntry(entryFile, e); } } return results.build(); }
@Override public List<ScanResult> scan() { String javaClassPath = AccessController.doPrivileged(new GetSystemPropertyAction(JAVA_CLASS_PATH_SYSTEM_PROPERTY)); if (javaClassPath == null) { throw CommonLogger.LOG.cannotReadJavaClassPathSystemProperty(); } ImmutableList.Builder<ScanResult> results = ImmutableList.builder(); Set<String> entries = ImmutableSet.of(javaClassPath.split(Pattern.quote(File.pathSeparator))); logger.debugv("Scanning class path entries: {0}", entries); for (String entry : entries) { if (entry == null || entry.isEmpty()) { continue; } File entryFile = new File(entry); if (!entryFile.canRead()) { throw CommonLogger.LOG.cannotReadClassPathEntry(entryFile); } try { if (entryFile.isDirectory()) { scanDirectory(entryFile, results); } else { scanJarFile(entryFile, results); } } catch (IOException e) { throw CommonLogger.LOG.cannotScanClassPathEntry(entryFile, e); } } return results.build(); }
@Override public List<ScanResult> scan() { String javaClassPath = AccessController.doPrivileged(new GetSystemPropertyAction(JAVA_CLASS_PATH_SYSTEM_PROPERTY)); if (javaClassPath == null) { throw CommonLogger.LOG.cannotReadJavaClassPathSystemProperty(); } ImmutableList.Builder<ScanResult> results = ImmutableList.builder(); Set<String> entries = ImmutableSet.of(javaClassPath.split(Pattern.quote(File.pathSeparator))); logger.debugv("Scanning class path entries: {0}", entries); for (String entry : entries) { if (entry == null || entry.isEmpty()) { continue; } File entryFile = new File(entry); if (!entryFile.canRead()) { throw CommonLogger.LOG.cannotReadClassPathEntry(entryFile); } try { if (entryFile.isDirectory()) { scanDirectory(entryFile, results); } else { scanJarFile(entryFile, results); } } catch (IOException e) { throw CommonLogger.LOG.cannotScanClassPathEntry(entryFile, e); } } return results.build(); }
@Override public List<ScanResult> scan() { String javaClassPath = AccessController.doPrivileged(new GetSystemPropertyAction(JAVA_CLASS_PATH_SYSTEM_PROPERTY)); if (javaClassPath == null) { throw CommonLogger.LOG.cannotReadJavaClassPathSystemProperty(); } ImmutableList.Builder<ScanResult> results = ImmutableList.builder(); Set<String> entries = ImmutableSet.of(javaClassPath.split(Pattern.quote(File.pathSeparator))); logger.debugv("Scanning class path entries: {0}", entries); for (String entry : entries) { if (entry == null || entry.isEmpty()) { continue; } File entryFile = new File(entry); if (!entryFile.canRead()) { throw CommonLogger.LOG.cannotReadClassPathEntry(entryFile); } try { if (entryFile.isDirectory()) { scanDirectory(entryFile, results); } else { scanJarFile(entryFile, results); } } catch (IOException e) { throw CommonLogger.LOG.cannotScanClassPathEntry(entryFile, e); } } return results.build(); }
@Override public List<ScanResult> scan() { String javaClassPath = AccessController.doPrivileged(new GetSystemPropertyAction(JAVA_CLASS_PATH_SYSTEM_PROPERTY)); if (javaClassPath == null) { throw CommonLogger.LOG.cannotReadJavaClassPathSystemProperty(); } ImmutableList.Builder<ScanResult> results = ImmutableList.builder(); Set<String> entries = ImmutableSet.of(javaClassPath.split(Pattern.quote(File.pathSeparator))); logger.debugv("Scanning class path entries: {0}", entries); for (String entry : entries) { if (entry == null || entry.isEmpty()) { continue; } File entryFile = new File(entry); if (!entryFile.canRead()) { throw CommonLogger.LOG.cannotReadClassPathEntry(entryFile); } try { if (entryFile.isDirectory()) { scanDirectory(entryFile, results); } else { scanJarFile(entryFile, results); } } catch (IOException e) { throw CommonLogger.LOG.cannotScanClassPathEntry(entryFile, e); } } return results.build(); }
@Override public List<ScanResult> scan() { String javaClassPath = AccessController.doPrivileged(new GetSystemPropertyAction(JAVA_CLASS_PATH_SYSTEM_PROPERTY)); if (javaClassPath == null) { throw CommonLogger.LOG.cannotReadJavaClassPathSystemProperty(); } ImmutableList.Builder<ScanResult> results = ImmutableList.builder(); Set<String> entries = ImmutableSet.of(javaClassPath.split(Pattern.quote(File.pathSeparator))); logger.debugv("Scanning class path entries: {0}", entries); for (String entry : entries) { if (entry == null || entry.isEmpty()) { continue; } File entryFile = new File(entry); if (!entryFile.canRead()) { throw CommonLogger.LOG.cannotReadClassPathEntry(entryFile); } try { if (entryFile.isDirectory()) { scanDirectory(entryFile, results); } else { scanJarFile(entryFile, results); } } catch (IOException e) { throw CommonLogger.LOG.cannotScanClassPathEntry(entryFile, e); } } return results.build(); }
@Override public List<ScanResult> scan() { String javaClassPath = AccessController.doPrivileged(new GetSystemPropertyAction(JAVA_CLASS_PATH_SYSTEM_PROPERTY)); if (javaClassPath == null) { throw CommonLogger.LOG.cannotReadJavaClassPathSystemProperty(); } ImmutableList.Builder<ScanResult> results = ImmutableList.builder(); Set<String> entries = ImmutableSet.of(javaClassPath.split(Pattern.quote(File.pathSeparator))); logger.debugv("Scanning class path entries: {0}", entries); for (String entry : entries) { if (entry == null || entry.isEmpty()) { continue; } File entryFile = new File(entry); if (!entryFile.canRead()) { throw CommonLogger.LOG.cannotReadClassPathEntry(entryFile); } try { if (entryFile.isDirectory()) { scanDirectory(entryFile, results); } else { scanJarFile(entryFile, results); } } catch (IOException e) { throw CommonLogger.LOG.cannotScanClassPathEntry(entryFile, e); } } return results.build(); }