mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-08-26 19:42:02 +00:00
fix: harden gzip decode and release 0.4.5
Avoid ZipException when Vert.x already decompressed gzip bodies, keep jackson-databind on the IDE classpath, and show a real build version instead of unknown. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -162,13 +162,18 @@ public class CommonUtil {
|
||||
try (var is = CommonUtil.class.getClassLoader().getResourceAsStream("app.properties")) {
|
||||
if (is != null) {
|
||||
properties.load(is);
|
||||
if (!properties.isEmpty()) {
|
||||
appVersion = properties.getProperty("app.version") + "build" + properties.getProperty("build");
|
||||
String version = properties.getProperty("app.version");
|
||||
String build = properties.getProperty("build");
|
||||
if (version != null && !version.contains("${")) {
|
||||
appVersion = version + "build" + (build == null || build.contains("${") ? "" : build);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("读取app.properties失败", e);
|
||||
}
|
||||
if (appVersion == null) {
|
||||
appVersion = "unknown";
|
||||
}
|
||||
}
|
||||
return appVersion;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user