|
@@ -7,12 +7,14 @@ package de.nplusc.izc.iZpl;
|
|
|
import com.sun.net.httpserver.Headers;
|
|
|
import com.sun.net.httpserver.HttpExchange;
|
|
|
import com.sun.net.httpserver.HttpHandler;
|
|
|
+import de.nplusc.izc.tools.IOtools.FileTK;
|
|
|
import java.io.IOException;
|
|
|
import java.io.OutputStream;
|
|
|
import java.net.InetSocketAddress;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.prefs.Preferences;
|
|
|
import org.yaml.snakeyaml.Yaml;
|
|
|
|
|
|
/**
|
|
@@ -118,7 +120,8 @@ public class PlProcessor implements HttpHandler
|
|
|
pool1=new ArrayList<>();
|
|
|
if(!reload)
|
|
|
{
|
|
|
- pool2=new ArrayList<>();//wichtig bei reload
|
|
|
+ System.out.println("Das solte nur bei Init auftauchen");
|
|
|
+ pool2=new ArrayList<>();//wichtig bei reload
|
|
|
}
|
|
|
List<String[]> list = PLReader.readList(path);
|
|
|
if(list==null)
|
|
@@ -139,18 +142,29 @@ public class PlProcessor implements HttpHandler
|
|
|
{
|
|
|
|
|
|
System.out.println("StartingReloadProcess");
|
|
|
-
|
|
|
- for (String[] el : pool2)
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (Boolean.valueOf(Preferences.userRoot().get("izpl.enableFastDebug", "false")))
|
|
|
+ {
|
|
|
+ FileTK.writeFile(yp.dump(pool2), "izpl-viewme.yDUMP");
|
|
|
+ }
|
|
|
+ for (String[] el : pool2)
|
|
|
+ {
|
|
|
+ int idx = pool1.indexOf(el);
|
|
|
+ System.out.println(idx);
|
|
|
+ if(idx==-1)
|
|
|
+ {
|
|
|
+ pool2.remove(el);//entfernte elemente killen
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ pool1.remove(idx);//subtrahieren der bereits gespielten elemente
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch(Exception e)
|
|
|
{
|
|
|
- int idx = pool1.indexOf(el);
|
|
|
- if(idx==-1)
|
|
|
- {
|
|
|
- pool2.remove(el);//entfernte elemente killen
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- pool1.remove(idx);//subtrahieren der bereits gespielten elemente
|
|
|
- }
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
System.out.println("><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><");
|