Browse Source

处理下NPE

bugfix/10.0
alex.sung 6 years ago
parent
commit
98dea7202b
  1. 4
      designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/impl/AbstractSendDataToCloud.java
  2. 9
      designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/impl/FocusPointMessageUploader.java

4
designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/impl/AbstractSendDataToCloud.java

@ -98,9 +98,11 @@ public abstract class AbstractSendDataToCloud implements XMLable {
}
private <T> void generateThisPageFile(DataList<T> points) {
File file = null;
try {
JSONArray jsonArray = dealWithSendFunctionContent(points);
if (jsonArray == null) {
return;
}
//生成json文件
fileEntityBuilder.generateFile(jsonArray, getFileEntityBuilder().getFolderName());
} catch (Exception e) {

9
designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/impl/FocusPointMessageUploader.java

@ -38,6 +38,9 @@ public class FocusPointMessageUploader extends AbstractSendDataToCloud {
@Override
public <T> JSONArray dealWithSendFunctionContent(DataList<T> focusPoints) {
if (focusPoints == null) {
return null;
}
JSONArray ja = new JSONArray();
for(T t:focusPoints.getList()){
FocusPoint focusPoint = (FocusPoint)t;
@ -59,9 +62,9 @@ public class FocusPointMessageUploader extends AbstractSendDataToCloud {
MessageCollectUtils.readXMLFile(instance, getLastTimeFile());
long currentTime = new Date().getTime();
long lastTime = MessageCollectUtils.getLastTimeMillis(this.lastTime);
if (currentTime - lastTime <= DELTA) {
return;
}
// if (currentTime - lastTime <= DELTA) {
// return;
// }
try {
generatePath();
queryData(currentTime, lastTime, FocusPoint.class);

Loading…
Cancel
Save