Skip to content

Commit

Permalink
snaploader-examples: applied API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pavly-gerges committed Aug 4, 2024
1 parent 4bc6e25 commit 8ac5a23
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public final class TestBasicFeatures {
DefaultDynamicLibraries.MAC_X86_64,
};

public static void main(String[] args) throws IOException {
public static void main(String[] args) throws Exception {
if (loader == null) {
loader = new NativeBinaryLoader(libraryInfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
*/
public final class TestBasicFeatures2 {

public static void main(String[] args) throws IOException {
public static void main(String[] args) throws Exception {

final Path compressionPath = Paths.get(PropertiesProvider.USER_DIR.getSystemProperty(), "libs", TestBasicFeatures.getJarFile());
final Path extractionPath = Files.createDirectories(Paths.get(PropertiesProvider.USER_DIR.getSystemProperty(), "libs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import java.nio.file.Paths;

public final class TestFilesystemException {
public static void main(String[] args) throws IOException {
public static void main(String[] args) throws Exception {
final Path compressionPath = Paths.get(PropertiesProvider.USER_DIR.getSystemProperty(), "libs", TestBasicFeatures.getJarFile());
final Path extractionPath = Files.createDirectories(Paths.get(PropertiesProvider.USER_DIR.getSystemProperty(), "libs",
NativeVariant.OS_NAME.getProperty(), NativeVariant.OS_ARCH.getProperty()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* @author pavl_g
*/
public class TestFilesystemMemoryLeak {
public static void main(String[] args) throws IOException {
public static void main(String[] args) throws Exception {
/* Locates the image inside the Zip Compression */
SnapLoaderLogger.setLoggingEnabled(true);
final FileLocator fileLocator = new FileLocator(getZipAbsolutePath(), getFilePath(), ZipCompressionType.ZIP);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void run() {
try {
Thread.sleep(200);
TestBasicFeatures.loader.loadLibrary(LoadingCriterion.CLEAN_EXTRACTION);
} catch (UnSupportedSystemError | IOException | InterruptedException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
Expand All @@ -69,7 +69,7 @@ public void run() {
try {
Thread.sleep(200);
TestBasicFeatures.loader.loadLibrary(LoadingCriterion.CLEAN_EXTRACTION);
} catch (UnSupportedSystemError | IOException | InterruptedException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
Expand All @@ -83,7 +83,7 @@ public void run() {
try {
Thread.sleep(200);
TestBasicFeatures.loader.loadLibrary(LoadingCriterion.CLEAN_EXTRACTION);
} catch (UnSupportedSystemError | IOException | InterruptedException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*/
public final class TestMultipleLoads {

public static void main(String[] args) throws InterruptedException, IOException {
public static void main(String[] args) throws Exception {
TestBasicFeatures.main(args);
new File(TestBasicFeatures.getNativeDynamicLibraryPath()).delete();
Thread.sleep(5000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
*/
public class TestZipExtractor {

public static void main(String[] args) throws IOException {
public static void main(String[] args) throws Exception {
/* Locates the image inside the Zip Compression */
final FileLocator fileLocator = new FileLocator(getZipAbsolutePath(), getFilePath(), ZipCompressionType.ZIP);
/* Extracts the image filesystem from the Zip Compression */
Expand Down

0 comments on commit 8ac5a23

Please sign in to comment.