Skip to content

Commit

Permalink
JENKINS-56625 Fix for too many open files
Browse files Browse the repository at this point in the history
  • Loading branch information
diginc committed Apr 2, 2019
1 parent 240917e commit f2d846a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/jenkinsci/plugins/badge/StatusImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ public int measureText(String text) throws IOException {
defaultFont = Font.createFont(Font.TRUETYPE_FONT, fontStream);
} catch (FontFormatException e) {
throw new IOException(e.getMessage());
}
} finally {
fontStream.close()
}
defaultFont = defaultFont.deriveFont(11f);
Canvas canvas = new Canvas();
FontMetrics fontMetrics = canvas.getFontMetrics(defaultFont);
Expand Down

0 comments on commit f2d846a

Please sign in to comment.