Merge branch 'stable-6.1' into stable-6.2
* stable-6.1: GC: Close File.lines stream Change-Id: Ia2be0b05ed860125a388b01d6c291832f08dd990
This commit is contained in:
commit
b118e7b4c4
|
@ -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