Small fixes suggested by Intellij IDEA

This commit is contained in:
Thijs Wiefferink 2018-08-12 16:23:43 +02:00
parent aa585e9b11
commit 28d03a6a3a
3 changed files with 5 additions and 4 deletions

View File

@ -736,7 +736,7 @@ public final class AreaShop extends JavaPlugin implements AreaShopInterface {
/**
* Print an error to the console.
* @param message The messagfe to print
* @param message The message to print
*/
public static void error(Object... message) {
AreaShop.getInstance().getLogger().severe(StringUtils.join(message, " "));

View File

@ -154,11 +154,11 @@ public class TeleportFeature extends RegionFeature {
int maxTries = plugin.getConfig().getInt("maximumTries");
// Tracking of which sides to continue the search
boolean done = isSafe(safeLocation) && ((blocksInRegion && insideRegion) || (!insideRegion));
boolean done = isSafe(safeLocation) && (blocksInRegion || !insideRegion);
boolean northDone = false, eastDone = false, southDone = false, westDone = false, topDone = false, bottomDone = false;
boolean continueThisDirection;
while(((blocksInRegion && insideRegion) || (!insideRegion)) && !done) {
while((blocksInRegion || !insideRegion) && !done) {
blocksInRegion = false;
// North side

View File

@ -49,6 +49,7 @@ import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@ -519,7 +520,7 @@ public class Metrics {
try {
gzos = new GZIPOutputStream(baos);
gzos.write(input.getBytes("UTF-8"));
gzos.write(input.getBytes(StandardCharsets.UTF_8));
} catch(IOException e) {
e.printStackTrace();
} finally {