projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosuilib: Fix crash when initializing site map cache
[fw/altos]
/
altosuilib
/
AltosSiteMapCache.java
diff --git
a/altosuilib/AltosSiteMapCache.java
b/altosuilib/AltosSiteMapCache.java
index c4316dabf4f5628cc26c3bddcbfcdab0b960e279..51778ce1301d404ed1c70b444c91afab9603e032 100644
(file)
--- a/
altosuilib/AltosSiteMapCache.java
+++ b/
altosuilib/AltosSiteMapCache.java
@@
-48,7
+48,6
@@
public class AltosSiteMapCache {
private static int fetch_one(File file, String url) {
URL u;
private static int fetch_one(File file, String url) {
URL u;
- System.out.printf("Loading URL %s\n", url);
try {
u = new URL(url);
} catch (java.net.MalformedURLException e) {
try {
u = new URL(url);
} catch (java.net.MalformedURLException e) {
@@
-159,7
+158,7
@@
public class AltosSiteMapCache {
for (int i = 0; i < cache_size; i++) {
if (i < new_size)
new_images[i] = images[i];
for (int i = 0; i < cache_size; i++) {
if (i < new_size)
new_images[i] = images[i];
- else
+ else
if (images[i] != null)
images[i].flush();
}
images = new_images;
images[i].flush();
}
images = new_images;
@@
-177,6
+176,7
@@
public class AltosSiteMapCache {
return new Point (x, y);
}
return new Point (x, y);
}
+/*
private static void dump_cache() {
int min_x = 1000, max_x = -1000, min_y = 1000, max_y = -1000;
private static void dump_cache() {
int min_x = 1000, max_x = -1000, min_y = 1000, max_y = -1000;
@@
-209,6
+209,7
@@
public class AltosSiteMapCache {
System.out.printf("\n");
}
}
System.out.printf("\n");
}
}
+*/
public static AltosSiteMapImage get_image(AltosSiteMapTile tile, File file, int width, int height) {
int oldest = -1;
public static AltosSiteMapImage get_image(AltosSiteMapTile tile, File file, int width, int height) {
int oldest = -1;