Commit 2bd8006c authored by Matija Obreza's avatar Matija Obreza
Browse files

Close the IOStream

parent dcf86484
......@@ -130,8 +130,7 @@ public class RepositoryServiceImpl implements RepositoryService {
image.setOriginalFilename(originalFilename);
image.setMimeType(mimeType);
try {
final InputStream in = new ByteArrayInputStream(bytes);
try (final InputStream in = new ByteArrayInputStream(bytes)) {
final BufferedImage imageData = ImageIO.read(in);
if (imageData != null) {
......
Supports Markdown
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