fix SCL findResource
All checks were successful
/ Build BaseBand Loader (push) Successful in 2m0s

This commit is contained in:
Daniella / Tove 2024-10-14 02:28:43 +02:00
parent 51b2727555
commit c2235c5c2c
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
2 changed files with 8 additions and 5 deletions

View file

@ -394,7 +394,7 @@ public class Loader implements Util {
byte[] bytes = new StreamReader(stream).readAllAsBytes();
try(FileOutputStream os = new FileOutputStream(filename)) {
os.write(bytes);
}
} catch (IOException ignored) { }
stream = new ByteArrayInputStream(bytes);
}
ZipInputStream jar = new ZipInputStream(stream);

View file

@ -23,11 +23,14 @@ public class SimpleClassLoader extends ClassLoader {
@Override
protected URL findResource(String name) {
try {
return URLWrapper.wrap(name, classes.get(name));
} catch (MalformedURLException e) {
throw new RuntimeException(e);
if(classes.get(name) != null) {
try {
return URLWrapper.wrap(name, classes.get(name));
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
return null;
}
@Override