Skip to content

Commit 95998d7

Browse files
committed
removed call to removed method in internal eclipse compare utilities
1 parent bde0b18 commit 95998d7

File tree

1 file changed

+4
-12
lines changed
  • eclipse-extensions/org.springframework.ide.eclipse.boot.wizard/src/org/springframework/ide/eclipse/boot/wizard/starters/eclipse

1 file changed

+4
-12
lines changed

eclipse-extensions/org.springframework.ide.eclipse.boot.wizard/src/org/springframework/ide/eclipse/boot/wizard/starters/eclipse/ResourceCompareInput.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -473,29 +473,21 @@ public void reset() throws CoreException {
473473
}
474474

475475
byte[] initialContent() throws CoreException {
476-
InputStream in = createStream();
477-
ByteArrayOutputStream bos= new ByteArrayOutputStream();
478-
try {
476+
try (InputStream in = createStream(); ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
477+
479478
while (true) {
480479
int c= in.read();
481480
if (c == -1)
482481
break;
483482
bos.write(c);
484483
}
485484

485+
return bos.toByteArray();
486+
486487
} catch (IOException ex) {
487488
return null;
488-
489-
} finally {
490-
Utilities.close(in);
491-
try {
492-
bos.close();
493-
} catch (IOException x) {
494-
// silently ignored
495-
}
496489
}
497490

498-
return bos.toByteArray();
499491
}
500492

501493
@Override

0 commit comments

Comments
 (0)