Commit cd8c6cc6 authored by Matija Obreza's avatar Matija Obreza
Browse files

Code cleanup

parent 419dbe0a
......@@ -31,11 +31,13 @@ public class SpringSecurityAuditorAware implements AuditorAware<User> {
@Override
public User getCurrentAuditor() {
LOG.info("Getting current auditor..");
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
LOG.info("Got " + authentication);
if (LOG.isDebugEnabled())
LOG.debug("Got " + authentication);
if (authentication == null || !authentication.isAuthenticated()) {
LOG.info("Not authenticated");
LOG.info("Not authenticated, returning null as current auditor.");
return null;
}
......
......@@ -119,15 +119,16 @@ public class CountryAlternateNamesUpdater implements CountryNamesUpdater {
LOG.error(e.getMessage(), e);
throw new IOException(e);
} finally {
}
try {
updateFromStream(alternateNamesStream);
} catch (IOException e) {
LOG.error(e);
throw e;
} finally {
IOUtils.closeQuietly(alternateNamesStream);
}
}
private void updateFromStream(InputStream instream) throws IOException {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment