mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00
formatting cleanup
This commit is contained in:
parent
fd1b998cb8
commit
6d50a1b627
1 changed files with 19 additions and 19 deletions
|
@ -112,9 +112,9 @@ final class ZLTreeResource extends ZLResource {
|
|||
static volatile ZLTreeResource ourRoot;
|
||||
private static final Object ourLock = new Object();
|
||||
|
||||
private static long ourTimeStamp = 0;
|
||||
private static String ourLanguage = null;
|
||||
private static String ourCountry = null;
|
||||
private static long ourTimeStamp = 0;
|
||||
private static String ourLanguage = null;
|
||||
private static String ourCountry = null;
|
||||
|
||||
private boolean myHasValue;
|
||||
private String myValue;
|
||||
|
@ -132,14 +132,14 @@ final class ZLTreeResource extends ZLResource {
|
|||
}
|
||||
}
|
||||
|
||||
private static void updateLanguage() {
|
||||
final long timeStamp = System.currentTimeMillis();
|
||||
if (timeStamp > ourTimeStamp + 1000) {
|
||||
synchronized (ourLock) {
|
||||
if (timeStamp > ourTimeStamp + 1000) {
|
||||
private static void updateLanguage() {
|
||||
final long timeStamp = System.currentTimeMillis();
|
||||
if (timeStamp > ourTimeStamp + 1000) {
|
||||
synchronized (ourLock) {
|
||||
if (timeStamp > ourTimeStamp + 1000) {
|
||||
ourTimeStamp = timeStamp;
|
||||
final String language = Locale.getDefault().getLanguage();
|
||||
final String country = Locale.getDefault().getCountry();
|
||||
final String language = Locale.getDefault().getLanguage();
|
||||
final String country = Locale.getDefault().getCountry();
|
||||
if ((language != null && !language.equals(ourLanguage)) ||
|
||||
(country != null && !country.equals(ourCountry))) {
|
||||
ourLanguage = language;
|
||||
|
@ -149,7 +149,7 @@ final class ZLTreeResource extends ZLResource {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadData(ResourceTreeReader reader, String fileName) {
|
||||
reader.readDocument(ourRoot, ZLResourceFile.createResourceFile("resources/zlibrary/" + fileName));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue