Skip to content

Commit

Permalink
Simplify code in ResourceReaders (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
odenix authored Feb 19, 2024
1 parent bbb4d82 commit 50a006b
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,6 @@ public Optional<Object> read(URI uri) throws IOException {
return Optional.empty();
}
}

@Override
public boolean hasHierarchicalUris() {
return true;
}

@Override
public boolean isGlobbable() {
return false;
}
}

private static final class ClassPathResource implements ResourceReader {
Expand Down Expand Up @@ -487,8 +477,7 @@ public Optional<Object> read(URI uri)
var dependency = getProjectDepsResolver().getResolvedDependency(assetUri.getPackageUri());
var path = getLocalPath(dependency, assetUri);
if (path != null) {
var url = path.toUri().toURL();
var bytes = IoUtils.readBytes(url);
var bytes = Files.readAllBytes(path);
return Optional.of(new Resource(uri, bytes));
}
var remoteDep = (Dependency.RemoteDependency) dependency;
Expand Down

0 comments on commit 50a006b

Please sign in to comment.