Skip to content

Commit

Permalink
Make it extend Closeable
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Jun 2, 2024
1 parent f73803f commit 25afebd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/main/java/cpw/mods/jarhandling/JarContents.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.jetbrains.annotations.ApiStatus;

import java.io.Closeable;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Path;
Expand All @@ -19,7 +20,7 @@
* Convert to a full jar with {@link SecureJar#from(JarContents)}.
*/
@ApiStatus.NonExtendable
public interface JarContents extends AutoCloseable {
public interface JarContents extends Closeable {
/**
* @see SecureJar#getPrimaryPath()
*/
Expand Down Expand Up @@ -70,10 +71,4 @@ static JarContents of(Path fileOrFolder) {
static JarContents of(Collection<Path> filesOrFolders) {
return new JarContentsBuilder().paths(filesOrFolders.toArray(new Path[0])).build();
}

/**
* Closes the underlying resources.
*/
@Override
void close() throws IOException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.BiPredicate;
import java.util.function.Supplier;
import java.util.jar.JarFile;
import java.util.jar.JarInputStream;
Expand Down

0 comments on commit 25afebd

Please sign in to comment.