public static ClassLoader create(Collection<File> bytecodeFilesOrDirectories) { List<File> files = Lists.newArrayList(); for (File file : bytecodeFilesOrDirectories) { if (file.isFile() && file.getPath().endsWith(".class")) { LOG.info("SonarQube Squid ClassLoader was expecting a JAR file instead of CLASS file : '" + file.getAbsolutePath() + "'"); } else { files.add(file); } } if (LOG.isDebugEnabled()) { LOG.debug("----- Classpath analyzed by Squid:"); for (File file : files) { LOG.debug(file.getAbsolutePath()); } LOG.debug("-----"); } try { return new SquidClassLoader(files); } catch (Exception e) { throw new IllegalStateException("Can not create ClassLoader", e); } }
public static ClassLoader create(Collection<File> bytecodeFilesOrDirectories) { List<File> files = Lists.newArrayList(); for (File file : bytecodeFilesOrDirectories) { if (file.isFile() && file.getPath().endsWith(".class")) { LOG.info("SonarQube Squid ClassLoader was expecting a JAR file instead of CLASS file : '" + file.getAbsolutePath() + "'"); } else { files.add(file); } } if (LOG.isDebugEnabled()) { LOG.debug("----- Classpath analyzed by Squid:"); for (File file : files) { LOG.debug(file.getAbsolutePath()); } LOG.debug("-----"); } try { return new SquidClassLoader(files); } catch (Exception e) { throw new IllegalStateException("Can not create ClassLoader", e); } }
public static SquidClassLoader create(Collection<File> bytecodeFilesOrDirectories) { List<File> files = Lists.newArrayList(); for (File file : bytecodeFilesOrDirectories) { if (file.isFile() && file.getPath().endsWith(".class")) { LOG.info("SonarQube Squid ClassLoader was expecting a JAR file instead of CLASS file : '" + file.getAbsolutePath() + "'"); } else { files.add(file); } } if (LOG.isDebugEnabled()) { LOG.debug("----- Classpath analyzed by Squid:"); for (File file : files) { LOG.debug(file.getAbsolutePath()); } LOG.debug("-----"); } try { return new SquidClassLoader(files); } catch (Exception e) { throw new IllegalStateException("Can not create ClassLoader", e); } } }
public static SquidClassLoader create(Collection<File> bytecodeFilesOrDirectories) { List<File> files = Lists.newArrayList(); for (File file : bytecodeFilesOrDirectories) { if (file.isFile() && file.getPath().endsWith(".class")) { LOG.info("SonarQube Squid ClassLoader was expecting a JAR file instead of CLASS file : '" + file.getAbsolutePath() + "'"); } else { files.add(file); } } if (LOG.isDebugEnabled()) { LOG.debug("----- Classpath analyzed by Squid:"); for (File file : files) { LOG.debug(file.getAbsolutePath()); } LOG.debug("-----"); } try { return new SquidClassLoader(files); } catch (Exception e) { throw new IllegalStateException("Can not create ClassLoader", e); } } }