Added a few null pointer checks and performed minor touchups (tried improving a few equals, clone and hashCode methods).

By: VictorD <victor.danell@gmail.com>
This commit is contained in:
Bukkit/Spigot
2011-03-05 12:27:51 +01:00
parent 5673661da0
commit bb755bb9a2
9 changed files with 51 additions and 16 deletions

View File

@@ -130,7 +130,7 @@ public class Downloader {
* The file to backup
*/
private static void backupFile(File file) {
if (file.exists()) {
if (file != null && file.exists()) {
System.out.println("Backing up old file: " + file.getName());
if (!new File(BACKUP).exists()) {
new File(BACKUP).mkdir();