1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +02:00

formatting cleanup

This commit is contained in:
Nikolay Pultsin 2012-04-24 04:10:07 +02:00
parent fd1b998cb8
commit 6d50a1b627

View file

@ -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));