Put the strings in the same getter. It makes no difference and is cleaner

This commit is contained in:
libraryaddict 2014-06-04 08:48:33 +12:00
parent 406627e404
commit 72f8aad151
2 changed files with 4 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>LibsDisguises</groupId>
<artifactId>LibsDisguises</artifactId>
<version>8.2.5</version>
<version>8.2.5-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>

View File

@ -47,13 +47,11 @@ public class LibsDisguises extends JavaPlugin {
File configFile = new File(getDataFolder(), "config.yml");
InputStream stream = null;
FileReader reader = null;
String toWrite = "";
String toRead = "";
try {
stream = getClassLoader().getResource("config.yml").openStream();
toWrite = read(new InputStreamReader(stream));
String toWrite = read(new InputStreamReader(stream));
reader = new FileReader(configFile);
toRead = read(reader);
String toRead = read(reader);
if (!toRead.equals(toWrite)) {
try {
@ -92,7 +90,7 @@ public class LibsDisguises extends JavaPlugin {
try {
// Here I use reflection to set the plugin for Disguise..
// Kind of stupid but I don't want open API calls for a commonly used object.
// Kind of stupid but I don't want open API calls for a commonly used class.
Field field = Disguise.class.getDeclaredField("plugin");
field.setAccessible(true);
field.set(null, this);