Skip to content

Commit

Permalink
close the right stream (getter would return a new stream).
Browse files Browse the repository at this point in the history
  • Loading branch information
mbien committed Aug 27, 2021
1 parent b443ee4 commit 96810ea
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
@com.google.inject.Singleton
public class ThemeManagerImpl implements ThemeManager {

static FileTypeMap map = null;
private static final FileTypeMap map;
static {
// TODO: figure out why PNG is missing from Java MIME types
map = FileTypeMap.getDefaultFileTypeMap();
Expand All @@ -77,7 +77,7 @@ public class ThemeManagerImpl implements ThemeManager {
}
}

private static Log log = LogFactory.getLog(ThemeManagerImpl.class);
private static final Log log = LogFactory.getLog(ThemeManagerImpl.class);
private final Weblogger roller;
// directory where themes are kept
private String themeDir = null;
Expand Down Expand Up @@ -354,7 +354,7 @@ public void importTheme(Weblog weblog, SharedTheme theme, boolean skipStylesheet
RollerMessages errors = new RollerMessages();
fileMgr.createThemeMediaFile(weblog, mf, errors);
try {
resource.getInputStream().close();
is.close();
} catch (IOException ex) {
errors.addError("error.closingStream");
log.debug("ERROR closing inputstream");
Expand Down

0 comments on commit 96810ea

Please sign in to comment.