Simplify code
This commit is contained in:
parent
2eb1d6834a
commit
999984fd38
1 changed files with 1 additions and 4 deletions
|
@ -82,13 +82,11 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaximumZoomSupported() {
|
public int getMaximumZoomSupported() {
|
||||||
getDatabase();
|
|
||||||
return base != null ? base.getMaximumZoomSupported() : maxZoom;
|
return base != null ? base.getMaximumZoomSupported() : maxZoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMinimumZoomSupported() {
|
public int getMinimumZoomSupported() {
|
||||||
getDatabase();
|
|
||||||
return base != null ? base.getMinimumZoomSupported() : minZoom;
|
return base != null ? base.getMinimumZoomSupported() : minZoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +273,6 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
if (db == null) {
|
if (db == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
long time = System.currentTimeMillis();
|
|
||||||
try {
|
try {
|
||||||
int z = getFileZoom(zoom);
|
int z = getFileZoom(zoom);
|
||||||
SQLiteCursor cursor = db.rawQuery(
|
SQLiteCursor cursor = db.rawQuery(
|
||||||
|
@ -283,13 +280,13 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
try {
|
try {
|
||||||
boolean e = cursor.moveToFirst();
|
boolean e = cursor.moveToFirst();
|
||||||
cursor.close();
|
cursor.close();
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
} catch (SQLiteDiskIOException e) {
|
} catch (SQLiteDiskIOException e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
|
long time = System.currentTimeMillis();
|
||||||
LOG.debug("Checking tile existance x = " + x + " y = " + y + " z = " + zoom + " for " + (System.currentTimeMillis() - time)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
LOG.debug("Checking tile existance x = " + x + " y = " + y + " z = " + zoom + " for " + (System.currentTimeMillis() - time)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue