Also catch errors when trying to instantiate optional classes.

This commit is contained in:
Maarten Coene 2025-04-24 00:39:32 +02:00
parent 5f9e01d7a0
commit 05fdc916fb
No known key found for this signature in database
GPG Key ID: 5BE0BA8CB80602AE
2 changed files with 2 additions and 5 deletions

View File

@ -297,10 +297,10 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
.getClassLoader()
.loadClass("org.apache.ivy.plugins.pack.Pack200Packing");
addArchivePacking(pack200.newInstance());
} catch (Exception e) {
} catch (Throwable t) {
// ignore: the pack200 packing isn't on the classpath
Message.info("impossible to define pack200 packaging: "
+ "org.apache.ivy.plugins.pack.Pack200Packing was not found", e);
+ "org.apache.ivy.plugins.pack.Pack200Packing was not found", t);
}
addReportOutputter(new LogReportOutputter());

View File

@ -28,9 +28,6 @@ public class Pack200Packing extends StreamPacking {
private static final String[] NAMES = {"pack200"};
public Pack200Packing() {
}
@Override
public String[] getNames() {
return NAMES;