diff --git a/src/main/java/chat/haver/server/Location.java b/src/main/java/chat/haver/server/Location.java index 7ebcd36..7270f7c 100644 --- a/src/main/java/chat/haver/server/Location.java +++ b/src/main/java/chat/haver/server/Location.java @@ -94,7 +94,7 @@ public static Location fromJSON(final JSONObject jsonObject) { */ @SuppressWarnings("checkstyle:magicnumber") // Maths is happening public double distanceBetween(final Location location) { - // TODO: Clean up + // TODO: clean up double dLat = (location.latitude - latitude) * Math.PI / 180d; double dLong = (location.longitude - longitude) * Math.PI / 180d; double a = @@ -120,6 +120,7 @@ public double distanceBetween(final Location location) { public long getTime() {return time;} public static Location getCentre(final List locationList) { + // TODO: clean up double sumX = 0; double sumY = 0; double sumZ = 0; diff --git a/src/main/java/chat/haver/server/Queue.java b/src/main/java/chat/haver/server/Queue.java index 118f591..29acdc5 100644 --- a/src/main/java/chat/haver/server/Queue.java +++ b/src/main/java/chat/haver/server/Queue.java @@ -54,7 +54,7 @@ public Queue(final int capacity, final int rate) { */ public boolean add() { final long now = System.currentTimeMillis(); - if(isFull() && !clear(now)) return false; + if(isFull() && !clear(now)) {return false;} array[head] = now; head = increment(head); @@ -100,7 +100,7 @@ public boolean clear() { * @param toIndex the last index to remove */ private void remove(final int fromIndex, final int toIndex) { - for(int i = fromIndex; i > toIndex; i = increment(i)) array[i] = EMPTY; + for(int i = fromIndex; i > toIndex; i = increment(i)) {array[i] = EMPTY;} } /**