Skip to content

Commit

Permalink
[3/2] Remove some unused code related to exports-only mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Oct 25, 2012
1 parent 5768f85 commit df7f1ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/jboss/modules/ModuleClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static <A, B> AtomicReferenceFieldUpdater<A, B> unsafeCast(AtomicReferen
*/
protected ModuleClassLoader(final Configuration configuration) {
module = configuration.getModule();
paths = new Paths<ResourceLoader, ResourceLoaderSpec>(configuration.getResourceLoaders(), Collections.<String, List<ResourceLoader>>emptyMap(), Collections.<String, List<ResourceLoader>>emptyMap());
paths = new Paths<ResourceLoader, ResourceLoaderSpec>(configuration.getResourceLoaders(), Collections.<String, List<ResourceLoader>>emptyMap());
final AssertionSetting setting = configuration.getAssertionSetting();
if (setting != AssertionSetting.INHERIT) {
setDefaultAssertionStatus(setting == AssertionSetting.ENABLED);
Expand Down Expand Up @@ -152,7 +152,7 @@ private boolean setResourceLoaders(final Paths<ResourceLoader, ResourceLoaderSpe
}
}
}
return pathsUpdater.compareAndSet(this, paths, new Paths<ResourceLoader, ResourceLoaderSpec>(resourceLoaders, allPaths, null));
return pathsUpdater.compareAndSet(this, paths, new Paths<ResourceLoader, ResourceLoaderSpec>(resourceLoaders, allPaths));
}

/**
Expand Down
14 changes: 2 additions & 12 deletions src/main/java/org/jboss/modules/Paths.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,22 @@
final class Paths<T, A> {
private final A[] sourceList;
private final Map<String, List<T>> allPaths;
private final Map<String, List<T>> exportedPaths;

Paths(final A[] sourceList, final Map<String, List<T>> allPaths, final Map<String, List<T>> exportedPaths) {
Paths(final A[] sourceList, final Map<String, List<T>> allPaths) {
this.sourceList = sourceList;
this.allPaths = allPaths;
this.exportedPaths = exportedPaths;
}

Map<String, List<T>> getAllPaths() {
return allPaths;
}

Map<String, List<T>> getExportedPaths() {
return exportedPaths;
}

Map<String, List<T>> getPaths(boolean export) {
return export ? exportedPaths : allPaths;
}

A[] getSourceList(A[] defVal) {
final A[] sourceList = this.sourceList;
return sourceList == null ? defVal : sourceList;
}

static final Paths<?, ?> NONE = new Paths<Object, Object>(null, null, null);
static final Paths<?, ?> NONE = new Paths<Object, Object>(null, null);

@SuppressWarnings({ "unchecked" })
static <T, A> Paths<T, A> none() {
Expand Down

0 comments on commit df7f1ef

Please sign in to comment.