|
|
@ -87,7 +87,6 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
private static final String HYPHEN = "-"; |
|
|
|
private static final String HYPHEN = "-"; |
|
|
|
|
|
|
|
|
|
|
|
private final SimpleDateFormat CHANGELOG_FORMAT = new SimpleDateFormat("M/d/y, h:m:s a", Locale.ENGLISH); |
|
|
|
|
|
|
|
private final SimpleDateFormat UPDATELOG_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
private final SimpleDateFormat UPDATELOG_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
private final SimpleDateFormat UPDATE_INFO_TABLE_FORMAT = new SimpleDateFormat("yyyy.MM.dd"); |
|
|
|
private final SimpleDateFormat UPDATE_INFO_TABLE_FORMAT = new SimpleDateFormat("yyyy.MM.dd"); |
|
|
|
|
|
|
|
|
|
|
@ -432,7 +431,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
return array; |
|
|
|
return array; |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage()); |
|
|
|
FineLoggerFactory.getLogger().error(e,e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
return JSONArray.create(); |
|
|
|
return JSONArray.create(); |
|
|
|
} |
|
|
|
} |
|
|
@ -449,7 +448,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
updateCachedInfoFile(jsonArray); |
|
|
|
updateCachedInfoFile(jsonArray); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
getUpdateInfoSuccess = true; |
|
|
|
getUpdateInfoSuccess = true; |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage()); |
|
|
|
FineLoggerFactory.getLogger().error(e,e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -478,7 +477,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
String[] updateInfo = readStr.split("\\t"); |
|
|
|
String[] updateInfo = readStr.split("\\t"); |
|
|
|
if (updateInfo.length == 2) { |
|
|
|
if (updateInfo.length == 2) { |
|
|
|
updateTimeStr = updateInfo[0]; |
|
|
|
updateTimeStr = updateInfo[0]; |
|
|
|
Date updateTime = CHANGELOG_FORMAT.parse(updateTimeStr); |
|
|
|
Date updateTime = UPDATELOG_FORMAT.parse(updateTimeStr); |
|
|
|
//形如 Build#release-2018.07.31.03.03.52.80
|
|
|
|
//形如 Build#release-2018.07.31.03.03.52.80
|
|
|
|
String currentNO = GeneralUtils.readBuildNO(); |
|
|
|
String currentNO = GeneralUtils.readBuildNO(); |
|
|
|
Date curJarDate = UPDATE_INFO_TABLE_FORMAT.parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); |
|
|
|
Date curJarDate = UPDATE_INFO_TABLE_FORMAT.parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); |
|
|
@ -520,7 +519,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
try (BufferedWriter bufferWriter = new BufferedWriter(writerStream)) { |
|
|
|
try (BufferedWriter bufferWriter = new BufferedWriter(writerStream)) { |
|
|
|
for (int i = 0; i < jsonArray.length(); i++) { |
|
|
|
for (int i = 0; i < jsonArray.length(); i++) { |
|
|
|
JSONObject jo = (JSONObject) jsonArray.get(i); |
|
|
|
JSONObject jo = (JSONObject) jsonArray.get(i); |
|
|
|
bufferWriter.write((String) jo.get("update") + '\t' + jo.get("title")); |
|
|
|
bufferWriter.write((String) jo.get("updateTime") + '\t' + jo.get("jiraId") + " " + jo.get("info")); |
|
|
|
bufferWriter.newLine(); |
|
|
|
bufferWriter.newLine(); |
|
|
|
bufferWriter.flush(); |
|
|
|
bufferWriter.flush(); |
|
|
|
} |
|
|
|
} |
|
|
|