Skip to content

Commit

Permalink
remove undeeded scanDirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed May 18, 2010
1 parent 7a0efc3 commit d815a13
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
Expand Up @@ -16,7 +16,6 @@
*/
package org.jboss.weld.environment.se.discovery;

import java.io.File;

/**
* The Scanner is used to find resources to be processed by Seam
Expand All @@ -28,12 +27,6 @@
*/
public interface Scanner
{
/**
* Recursively scan directories.
*
* @param directories An array of the roots of the directory trees to scan
*/
public void scanDirectories(File[] directories);

/**
* Scan for structures which contain any of the given resources in their root
Expand Down
Expand Up @@ -16,8 +16,6 @@
*/
package org.jboss.weld.environment.se.discovery;

import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URL;
Expand All @@ -26,14 +24,17 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.jboss.weld.environment.se.discovery.handlers.URLHandler;

import org.jboss.weld.environment.se.discovery.handlers.FileSystemURLHandler;
import org.jboss.weld.environment.se.discovery.handlers.URLHandler;
import org.jboss.weld.environment.se.exceptions.ClasspathScanningException;
import org.jboss.weld.resources.spi.ResourceLoader;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;

/**
* Implementation of {@link Scanner} which can scan a {@link URLClassLoader}
*
Expand Down Expand Up @@ -65,15 +66,6 @@ public void setURLHandler(String type, URLHandler handler)
urlHandlers.put(type, handler);
}

public void scanDirectories(File[] directories)
{
for (File directory : directories)
{
// can only use a file-based scanner to scan directories
urlHandlers.get(FILE).handleDirectory(directory);
}
}

public void scanResources(String[] resources)
{
Multimap<String, String> paths = HashMultimap.create();
Expand Down
Expand Up @@ -25,6 +25,7 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;

import org.jboss.weld.environment.se.discovery.SEWeldDiscovery;
import org.jboss.weld.environment.se.discovery.Scanner;
import org.jboss.weld.resources.spi.ResourceLoader;
Expand Down Expand Up @@ -103,11 +104,6 @@ private void handleArchiveByFile(File file) throws IOException
}
}

public void handleDirectory(File file)
{
handleDirectory(file, null);
}

protected void handleDirectory(File file, String path)
{
handleDirectory(file, path, new File[0]);
Expand Down
Expand Up @@ -16,7 +16,6 @@
*/
package org.jboss.weld.environment.se.discovery.handlers;

import java.io.File;
import java.util.Collection;

/**
Expand All @@ -27,6 +26,4 @@ public interface URLHandler {

void handle(Collection<String> paths);

void handleDirectory(File file);

}

0 comments on commit d815a13

Please sign in to comment.