* OPT: Fix a few compilation warnings.

This commit is contained in:
Prokopyl 2015-03-17 00:32:42 +01:00
parent 1cb42e4965
commit e4bd514a6e
3 changed files with 9 additions and 15 deletions

View File

@ -47,7 +47,6 @@ import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.UUID;
import java.util.logging.Level;
import java.util.zip.GZIPOutputStream;
public class MetricsLite
@ -198,7 +197,7 @@ public class MetricsLite
firstPost = false;
} catch (IOException e) {
if (debug) {
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + e.getMessage());
PluginLogger.LogWarning("[Metrics] ", e);
}
}
}
@ -218,14 +217,9 @@ public class MetricsLite
try {
// Reload the metrics file
configuration.load(getConfigFile());
} catch (IOException ex) {
} catch (IOException | InvalidConfigurationException ex) {
if (debug) {
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage());
}
return true;
} catch (InvalidConfigurationException ex) {
if (debug) {
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage());
PluginLogger.LogInfo("[Metrics] " + ex.getMessage());
}
return true;
}
@ -281,7 +275,7 @@ public class MetricsLite
*
* @return the File object for the config file
*/
public File getConfigFile() {
public final File getConfigFile() {
// I believe the easiest way to get the base folder (e.g craftbukkit set via -P) for plugins to use
// is to abuse the plugin object we already have
// plugin.getDataFolder() => base/plugins/PluginA/
@ -414,7 +408,7 @@ public class MetricsLite
gzos = new GZIPOutputStream(baos);
gzos.write(input.getBytes("UTF-8"));
} catch (IOException e) {
e.printStackTrace();
PluginLogger.LogError("MetricsLite GZIP error : ", e);
} finally {
if (gzos != null) try {
gzos.close();
@ -507,7 +501,8 @@ public class MetricsLite
default:
if (chr < ' ') {
String t = "000" + Integer.toHexString(chr);
builder.append("\\u" + t.substring(t.length() - 4));
builder.append("\\u");
builder.append(t.substring(t.length() - 4));
} else {
builder.append(chr);
}

View File

@ -18,7 +18,6 @@
package fr.moribus.imageonmap.image;
import fr.moribus.imageonmap.PluginLogger;
import fr.moribus.imageonmap.worker.Worker;
import fr.moribus.imageonmap.worker.WorkerRunnable;
import java.awt.image.BufferedImage;

View File

@ -40,7 +40,7 @@ public abstract class ImageMap implements ConfigurationSerializable
public abstract short[] getMapsIDs();
public abstract boolean managesMap(short mapID);
/*** Serialization methods ***/
/* ====== Serialization methods ====== */
protected ImageMap(Map<String, Object> map, UUID userUUID) throws IllegalArgumentException
{
@ -66,7 +66,7 @@ public abstract class ImageMap implements ConfigurationSerializable
}
/*** Getters & Setters ***/
/* ====== Getters & Setters ====== */
public UUID getUserUUID()
{