Merge branch 'stable-6.3' into stable-6.4
* stable-6.3: GC: Close File.lines stream Change-Id: I99455916d447f5dffed85e9a5c1d51b323f07a16
This commit is contained in:
commit
cd2dc85f31
|
@ -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