Skip to content

Commit f466184

Browse files
committed
修改版本号
1 parent e77a51d commit f466184

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>github.fileengine</groupId>
88
<artifactId>File-Engine</artifactId>
9-
<version>4.2</version>
9+
<version>4.3</version>
1010
<repositories>
1111
<repository>
1212
<id>mulesoft</id>

src/main/java/file/engine/services/utils/connection/SQLiteUtil.java

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -414,24 +414,29 @@ private static void createPriorityTable() throws SQLException {
414414
try (Statement statement = getStatement("cache")) {
415415
int row = statement.executeUpdate("CREATE TABLE IF NOT EXISTS priority(SUFFIX text unique, PRIORITY INT);");
416416
if (row == 0) {
417-
int count = 10;
418-
HashMap<String, Integer> map = new HashMap<>();
419-
map.put("lnk", count--);
420-
map.put("exe", count--);
421-
map.put("bat", count--);
422-
map.put("cmd", count--);
423-
map.put("txt", count--);
424-
map.put("docx", count--);
425-
map.put("zip", count--);
426-
map.put("rar", count--);
427-
map.put("7z", count--);
428-
map.put("html", count);
429-
map.put("defaultPriority", 0);
417+
HashMap<String, Integer> map = generateSuffixPriorityMap();
430418
insertAllSuffixPriority(map, statement);
431419
}
432420
}
433421
}
434422

423+
private static HashMap<String, Integer> generateSuffixPriorityMap() {
424+
int count = 10;
425+
HashMap<String, Integer> map = new HashMap<>();
426+
map.put("lnk", count--);
427+
map.put("exe", count--);
428+
map.put("bat", count--);
429+
map.put("cmd", count--);
430+
map.put("txt", count--);
431+
map.put("docx", count--);
432+
map.put("zip", count--);
433+
map.put("rar", count--);
434+
map.put("7z", count--);
435+
map.put("html", count);
436+
map.put("defaultPriority", 0);
437+
return map;
438+
}
439+
435440
private static void createCacheTable() throws SQLException {
436441
try (PreparedStatement pStmt = getPreparedStatement("CREATE TABLE IF NOT EXISTS cache(PATH text unique);", "cache")) {
437442
pStmt.executeUpdate();

0 commit comments

Comments
 (0)