OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 174 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 180
Line 262... Line 262...
262
    public final List<File> getClasspath() {
262
    public final List<File> getClasspath() {
263
        return this.classpath;
263
        return this.classpath;
264
    }
264
    }
265
 
265
 
266
    public final List<URL> getURLs(final Set<String> jars) {
266
    public final List<URL> getURLs(final Set<String> jars) {
-
 
267
        final List<File> foundJars = findJarFiles(jars);
-
 
268
        final List<URL> res = new ArrayList<>(foundJars.size());
-
 
269
        for (final File foundJar : foundJars) {
-
 
270
            res.add(toURL(foundJar));
-
 
271
        }
-
 
272
        return res;
-
 
273
    }
-
 
274
 
-
 
275
    public final List<File> findJarFiles(final Set<String> jars) {
267
        final int stop = this.getClasspath().size();
276
        final int stop = this.getClasspath().size();
268
        final List<URL> res = new ArrayList<URL>();
277
        final List<File> res = new ArrayList<>();
269
        for (int i = 0; i < stop; i++) {
278
        for (int i = 0; i < stop; i++) {
270
            final File[] foundJars = this.getClasspath().get(i).listFiles(new FileFilter() {
279
            final File[] foundJars = this.getClasspath().get(i).listFiles(new FileFilter() {
271
                @Override
280
                @Override
272
                public boolean accept(File f) {
281
                public boolean accept(File f) {
273
                    return jars.contains(f.getName());
282
                    return jars.contains(f.getName());
274
                }
283
                }
275
            });
284
            });
276
            for (final File foundJar : foundJars) {
285
            for (final File foundJar : foundJars) {
277
                res.add(toURL(foundJar));
286
                res.add(foundJar);
278
            }
287
            }
279
        }
288
        }
280
        return res;
289
        return res;
281
    }
290
    }
282
 
291