Merge remote-tracking branch 'remotes/origin/hechu1'

# Conflicts:
#	.idea/artifacts/gdms_war_exploded.xml
#	GDMS.iml
master
zhai_lw 6 years ago
parent 20058dd88f
commit e4acad3a6d

@ -2,17 +2,19 @@ package gdms;
import dao.DBManagement;
import error.GExcptFileIO;
import error.GExcptFormat;
import error.GExcptInit;
import error.GExcptSQL;
import net.sf.json.JSONObject;
import utils.Utils;
import java.text.ParseException;
import java.util.*;
public class GDMS {
static Map<String, Date> schedules;
static String schedulePath = "";
public static void init() throws GExcptInit {
public static void init() throws GExcptInit, GExcptFormat {
initSchedule();
Timer timer = new Timer(true);
for(Map.Entry<String, Date> schedule:schedules.entrySet()){
@ -204,7 +206,7 @@ public class GDMS {
throw new GExcptInit("GlobalTimePoint.json error");
}
private static void initSchedule() {
private static void initSchedule() throws GExcptFormat {
schedules = new HashMap<>();
String sets= null;
try {
@ -217,7 +219,12 @@ public class GDMS {
while (it.hasNext()) {
String key = (String)it.next();
Object value = jo.get(key);
schedules.put(key, new utils.Utils.dateFormat((String) value));
try {
schedules.put(key, Configuration.dateFormat.parse((String) value));
} catch (ParseException e) {
e.printStackTrace();
throw new GExcptFormat("json date format error");
}
}
}
}

Loading…
Cancel
Save