mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-10 08:02:40 +01:00
DroidFish: Fixed compiler warnings.
This commit is contained in:
@@ -81,9 +81,9 @@ public final class TreeLogger {
|
||||
|
||||
/** Get a logger object set up for analyzing a log file. */
|
||||
public static final TreeLogger getAnalyzer(String filename) {
|
||||
RandomAccessFile raf = null;
|
||||
try {
|
||||
TreeLogger log = new TreeLogger();
|
||||
RandomAccessFile raf;
|
||||
raf = new RandomAccessFile(filename, "rw");
|
||||
log.fc = raf.getChannel();
|
||||
long len = raf.length();
|
||||
@@ -95,6 +95,8 @@ public final class TreeLogger {
|
||||
throw new RuntimeException();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException();
|
||||
} finally {
|
||||
if (raf != null) try { raf.close(); } catch (IOException e) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -268,6 +268,7 @@ public class ChessController {
|
||||
}
|
||||
}
|
||||
pgn = out.toString();
|
||||
sc.close();
|
||||
}
|
||||
|
||||
// Parse tag section
|
||||
@@ -315,6 +316,7 @@ public class ChessController {
|
||||
}
|
||||
|
||||
// Parse move text section
|
||||
sc.close();
|
||||
sc = new Scanner(pgn);
|
||||
sc.useDelimiter("\\s+");
|
||||
while (sc.hasNext()) {
|
||||
@@ -326,6 +328,7 @@ public class ChessController {
|
||||
break;
|
||||
game.processString(strMove);
|
||||
}
|
||||
sc.close();
|
||||
}
|
||||
|
||||
public void setFENOrPGN(String fenPgn) throws ChessParseError {
|
||||
|
||||
Reference in New Issue
Block a user