Skip to content

Commit

Permalink
Adjust class file locators for multi-release jars.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Sep 24, 2024
1 parent c81f382 commit 5b5af9f
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 124 deletions.
9 changes: 4 additions & 5 deletions byte-buddy-dep/src/main/java/net/bytebuddy/build/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -2260,9 +2260,8 @@ interface Origin extends Iterable<Element>, Closeable {
* of this origin to close the locator or its underlying resources.
*
* @return A class file locator for locating class files of this instance.
* @throws IOException If an I/O exception occurs.
*/
ClassFileLocator getClassFileLocator() throws IOException;
ClassFileLocator getClassFileLocator();

/**
* An origin implementation for a jar file.
Expand Down Expand Up @@ -2409,7 +2408,7 @@ public Manifest getManifest() throws IOException {
/**
* {@inheritDoc}
*/
public ClassFileLocator getClassFileLocator() throws IOException {
public ClassFileLocator getClassFileLocator() {
return delegate.getClassFileLocator();
}

Expand Down Expand Up @@ -2821,7 +2820,7 @@ public Manifest getManifest() throws IOException {
/**
* {@inheritDoc}
*/
public ClassFileLocator getClassFileLocator() throws IOException {
public ClassFileLocator getClassFileLocator() {
List<ClassFileLocator> classFileLocators = new ArrayList<ClassFileLocator>(origins.size());
for (Source.Origin origin : origins) {
classFileLocators.add(origin.getClassFileLocator());
Expand Down Expand Up @@ -3086,7 +3085,7 @@ public Origin read() {
/**
* {@inheritDoc}
*/
public ClassFileLocator getClassFileLocator() throws IOException {
public ClassFileLocator getClassFileLocator() {
return new ClassFileLocator.ForFolder(folder);
}

Expand Down
Loading

0 comments on commit 5b5af9f

Please sign in to comment.