code cleanup
This commit is contained in:
parent
0cce03198c
commit
fdcd98b988
2 changed files with 7 additions and 4 deletions
|
@ -64,7 +64,10 @@ public class RAPConfiguration implements ApplicationConfiguration {
|
|||
application.addResource("fav_icon", new ResourceLoader() {
|
||||
@Override
|
||||
public InputStream getResourceAsStream(final String resourceName) throws IOException {
|
||||
return RAPConfiguration.class.getClassLoader().getResourceAsStream("static/images/fav_icon.png");
|
||||
return Thread
|
||||
.currentThread()
|
||||
.getContextClassLoader()
|
||||
.getResourceAsStream("static/images/fav_icon.png");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -226,11 +226,11 @@ public class CertificateController {
|
|||
.flatMap(certData -> this.userActivityLogDAO.log(UserLogActivityType.IMPORT, certData))
|
||||
.getOrThrow();
|
||||
|
||||
} catch (final RuntimeException re) {
|
||||
IOUtils.closeQuietly(inputStream);
|
||||
throw re;
|
||||
} catch (final Exception e) {
|
||||
IOUtils.closeQuietly(inputStream);
|
||||
if (e instanceof RuntimeException) {
|
||||
throw (RuntimeException) e;
|
||||
}
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue