|
|
|
@ -35,6 +35,7 @@ import com.fr.json.JSONArray;
|
|
|
|
|
import com.fr.json.JSONObject; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.stable.EncodeConstants; |
|
|
|
|
import com.fr.stable.ProductConstants; |
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
@ -513,16 +514,15 @@ public class UpdateMainDialog extends UIDialog {
|
|
|
|
|
if (endTime.equals(lastUpdateCacheTime) || jsonArray.length() == 0 || ComparatorUtils.compare(endTime, lastUpdateCacheTime) <= 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
OutputStreamWriter writerStream = new OutputStreamWriter(new FileOutputStream(cacheFile), "UTF-8"); |
|
|
|
|
BufferedWriter bufferWriter = new BufferedWriter(writerStream); |
|
|
|
|
try (OutputStreamWriter writerStream = new OutputStreamWriter(new FileOutputStream(cacheFile), EncodeConstants.ENCODING_UTF_8); |
|
|
|
|
BufferedWriter bufferWriter = new BufferedWriter(writerStream)) { |
|
|
|
|
for (int i = 0; i < jsonArray.length(); i++) { |
|
|
|
|
JSONObject jo = (JSONObject) jsonArray.get(i); |
|
|
|
|
bufferWriter.write((String) jo.get("update") + '\t' + jo.get("title")); |
|
|
|
|
bufferWriter.newLine(); |
|
|
|
|
bufferWriter.flush(); |
|
|
|
|
} |
|
|
|
|
bufferWriter.close(); |
|
|
|
|
writerStream.close(); |
|
|
|
|
} |
|
|
|
|
lastUpdateCacheState = UPDATE_CACHE_STATE_SUCCESS; |
|
|
|
|
lastUpdateCacheTime = endTime; |
|
|
|
|
cacheProperty.updateProperty("updateTime", lastUpdateCacheTime); |
|
|
|
@ -634,6 +634,7 @@ public class UpdateMainDialog extends UIDialog {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取当前jar的md5 |
|
|
|
|
* |
|
|
|
|
* @param currentJAR |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|