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