From 6c6d29a402d5a23d7aa93d91c31881a93acadd92 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Tue, 15 Mar 2011 21:04:53 +0100 Subject: [PATCH] Removed some warnings, redisabled BufferedOutputStream closing. --- src/main/java/org/dynmap/JsonTimerTask.java | 2 +- src/main/java/org/dynmap/kzedmap/KzedMap.java | 2 +- .../web/handlers/ClientConfigurationHandler.java | 12 +++--------- .../org/dynmap/web/handlers/ClientUpdateHandler.java | 12 +++--------- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/main/java/org/dynmap/JsonTimerTask.java b/src/main/java/org/dynmap/JsonTimerTask.java index 9b936776..615d5d6f 100644 --- a/src/main/java/org/dynmap/JsonTimerTask.java +++ b/src/main/java/org/dynmap/JsonTimerTask.java @@ -64,7 +64,7 @@ class JsonTimerTask extends TimerTask { } if (jsonMsgs != null) { - Iterator iter = jsonMsgs.iterator(); + Iterator iter = jsonMsgs.iterator(); while (iter.hasNext()) { JSONObject o = (JSONObject) iter.next(); if (Long.parseLong(String.valueOf(o.get("timestamp"))) >= (lastTimestamp)) { diff --git a/src/main/java/org/dynmap/kzedmap/KzedMap.java b/src/main/java/org/dynmap/kzedmap/KzedMap.java index a32e589f..09841714 100644 --- a/src/main/java/org/dynmap/kzedmap/KzedMap.java +++ b/src/main/java/org/dynmap/kzedmap/KzedMap.java @@ -144,7 +144,7 @@ public class KzedMap extends MapType { KzedMapTile t = (KzedMapTile) tile; int ix = KzedMap.anchorx + t.px / 2 + t.py / 2; - int iy = 127; + //int iy = 127; int iz = KzedMap.anchorz + t.px / 2 - t.py / 2; int x1 = ix - KzedMap.tileHeight / 2; diff --git a/src/main/java/org/dynmap/web/handlers/ClientConfigurationHandler.java b/src/main/java/org/dynmap/web/handlers/ClientConfigurationHandler.java index 09f6d88b..52c5591b 100644 --- a/src/main/java/org/dynmap/web/handlers/ClientConfigurationHandler.java +++ b/src/main/java/org/dynmap/web/handlers/ClientConfigurationHandler.java @@ -33,14 +33,8 @@ public class ClientConfigurationHandler implements HttpHandler { response.status = HttpStatus.OK; BufferedOutputStream out = null; - try { - out = new BufferedOutputStream(response.getBody()); - out.write(cachedConfiguration); - out.flush(); - } - finally - { - out.close(); - } + out = new BufferedOutputStream(response.getBody()); + out.write(cachedConfiguration); + out.flush(); } } diff --git a/src/main/java/org/dynmap/web/handlers/ClientUpdateHandler.java b/src/main/java/org/dynmap/web/handlers/ClientUpdateHandler.java index ff0ed7ca..b7ae4dfc 100644 --- a/src/main/java/org/dynmap/web/handlers/ClientUpdateHandler.java +++ b/src/main/java/org/dynmap/web/handlers/ClientUpdateHandler.java @@ -88,14 +88,8 @@ public class ClientUpdateHandler implements HttpHandler { response.status = HttpStatus.OK; BufferedOutputStream out = null; - try { - out = new BufferedOutputStream(response.getBody()); - out.write(bytes); - out.flush(); - } - finally - { - out.close(); - } + out = new BufferedOutputStream(response.getBody()); + out.write(bytes); + out.flush(); } } \ No newline at end of file