Merge branch 'stable-6.0' into stable-6.1
* stable-6.0: GC: Close File.lines stream Change-Id: I2f9e6da5584a40bb4b4efed0b87ae456f119d757
This commit is contained in:
commit
5b16c8ae15
|
@ -1683,8 +1683,9 @@ private void failedToLock() {
|
|||
|
||||
private void gcAlreadyRunning() {
|
||||
close();
|
||||
try {
|
||||
Optional<String> s = Files.lines(pidFile).findFirst();
|
||||
Optional<String> s;
|
||||
try (Stream<String> lines = Files.lines(pidFile)) {
|
||||
s = lines.findFirst();
|
||||
String machine = null;
|
||||
String pid = null;
|
||||
if (s.isPresent()) {
|
||||
|
|
Loading…
Reference in New Issue