fix unclosed scanner
Former-commit-id: b9c0fc5e38
Former-commit-id: 048eebdff9f3f24f2701c8cceb75b410adcc3b76
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#! /usr/bin/env sh
|
||||
export GITHUB_USER=eyedeekay
|
||||
export GITHUB_REPO=i2p.plugins.firefox
|
||||
export GITHUB_NAME="Fix URL argument passing"
|
||||
export GITHUB_NAME="Fix unclosed scanner"
|
||||
export GITHUB_DESCRIPTION=$(cat CHANGES.md)
|
||||
export GITHUB_TAG=0.0.32
|
||||
export GITHUB_TAG=0.0.33
|
@ -118,13 +118,14 @@ public class I2PFirefoxProfileChecker extends I2PCommonBrowser {
|
||||
String newString =
|
||||
"\"browser.startup.homepage\", \"http://127.0.0.1:7657\"";
|
||||
try {
|
||||
Scanner scanner = new Scanner(file);
|
||||
// now read the file line by line...
|
||||
while (scanner.hasNextLine()) {
|
||||
String line = scanner.nextLine();
|
||||
if (line.contains("browser.startup.homepage")) {
|
||||
oldString = line.toString();
|
||||
return undoValue(oldString, newString, fileToBeModified);
|
||||
try (Scanner scanner = new Scanner(file)) {
|
||||
// now read the file line by line...
|
||||
while (scanner.hasNextLine()) {
|
||||
String line = scanner.nextLine();
|
||||
if (line.contains("browser.startup.homepage")) {
|
||||
oldString = line.toString();
|
||||
return undoValue(oldString, newString, fileToBeModified);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
|
Reference in New Issue
Block a user