From 1a6c687f673bf168675e2b3d521ac898039d5a30 Mon Sep 17 00:00:00 2001
From: Ivan Olexyn <ivan@olexyn.com>
Date: Sat, 18 Jan 2020 17:12:29 +0100
Subject: [PATCH] Remove global Maps for deleted/created objects.

---
 src/com/olexyn/ensync/Main.java               |  3 +-
 .../olexyn/ensync/artifacts/SyncEntity.java   | 37 +------------------
 2 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/src/com/olexyn/ensync/Main.java b/src/com/olexyn/ensync/Main.java
index 32fff86..b8b9203 100644
--- a/src/com/olexyn/ensync/Main.java
+++ b/src/com/olexyn/ensync/Main.java
@@ -80,8 +80,7 @@ public class Main {
                 }
 
 
-                syncEntity.addToMapCreated(syncDirectory.getListCreated());
-                syncEntity.addToMapDeleted(syncDirectory.getListDeleted());
+                
 //
                 // WARNING:
                 //  Be very carefull when to update the StateFileOld
diff --git a/src/com/olexyn/ensync/artifacts/SyncEntity.java b/src/com/olexyn/ensync/artifacts/SyncEntity.java
index 16f2c6b..d26acae 100644
--- a/src/com/olexyn/ensync/artifacts/SyncEntity.java
+++ b/src/com/olexyn/ensync/artifacts/SyncEntity.java
@@ -17,8 +17,7 @@ public class SyncEntity {
     public String name;
     public int syncInterval = 3600;
     public Map<String, SyncDirectory> syncDirectories = new HashMap<>();
-    private Map<String, File> mapCreated = new HashMap<>();
-    private Map<String, File> mapDeleted = new HashMap<>();
+
     Tools tools = new Tools();
 
     /**
@@ -43,44 +42,10 @@ public class SyncEntity {
         }
     }
 
-    public Map<String, File> getMapCreated() {
-        for (Map.Entry<String, SyncDirectory> entry : syncDirectories.entrySet()) {
-            SyncDirectory syncDirectory = entry.getValue();
-            for (File file : syncDirectory.getListCreated()) {
-                mapCreated.put(file.getPath(), file);
-            }
-
-        }
-
 
-        return mapCreated;
-    }
-
-    public Map<String, File> getMapDeleted() {
 
-        for (Map.Entry<String, SyncDirectory> entry : syncDirectories.entrySet()) {
-            SyncDirectory syncDirectory = entry.getValue();
-            for (File file : syncDirectory.getListDeleted()) {
-                mapDeleted.put(file.getPath(), file);
-            }
 
-        }
 
 
-        return mapDeleted;
-    }
-
-    public void addToMapCreated(List<File> listCreated) {
-        for (File file : listCreated) {
-            mapCreated.put(file.getPath(), file);
-        }
-    }
-
-
-    public void addToMapDeleted(List<File> listDeleted) {
-        for (File file : listDeleted) {
-            mapDeleted.put(file.getPath(), file);
-        }
-    }
 
 }