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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user