Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline EmptyScanner into build context #55

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion src/main/java/org/codehaus/plexus/build/DefaultBuildContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -47,6 +48,7 @@
@Singleton
public class DefaultBuildContext implements BuildContext {

private static final String[] EMPTY_STRING_ARRAY = new String[0];
private final Map<String, Object> contextMap = new ConcurrentHashMap<>();
private final Logger logger = LoggerFactory.getLogger(DefaultBuildContext.class);
/** {@inheritDoc} */
Expand Down Expand Up @@ -93,7 +95,43 @@ public void refresh(File file) {

/** {@inheritDoc} */
public Scanner newDeleteScanner(File basedir) {
return new EmptyScanner(basedir);
return new Scanner() {
@Override
public void addDefaultExcludes() {
}

@Override
public String[] getIncludedDirectories() {
return EMPTY_STRING_ARRAY;
}

@Override
public String[] getIncludedFiles() {
return EMPTY_STRING_ARRAY;
}

@Override
public void scan() {
}

@Override
public void setExcludes(String[] excludes) {
}

@Override
public void setIncludes(String[] includes) {
}

@Override
public File getBasedir() {
return basedir;
}

@Override
public void setFilenameComparator(Comparator<String> comparator) {

}
};
}

/** {@inheritDoc} */
Expand Down
101 changes: 0 additions & 101 deletions src/main/java/org/codehaus/plexus/build/EmptyScanner.java

This file was deleted.