mirror of
https://github.com/CarmJos/MineSQL.git
synced 2026-06-04 16:43:03 +08:00
fix(get): 修复获取首个Manager会出现报错的问题
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>minesql-parent</artifactId>
|
||||
<groupId>cc.carm.plugin</groupId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.2.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>minesql-parent</artifactId>
|
||||
<groupId>cc.carm.plugin</groupId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.2.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<properties>
|
||||
|
||||
@@ -21,7 +21,9 @@ public class MineSQLRegistry implements SQLRegistry {
|
||||
|
||||
@Override
|
||||
public @NotNull Optional<@Nullable SQLManager> getOptional(@Nullable String id) {
|
||||
return Optional.of(this.managers.get(id));
|
||||
if (id != null) return Optional.of(this.managers.get(id));
|
||||
else if (managers.isEmpty()) return Optional.empty();
|
||||
else return Optional.ofNullable(managers.values().iterator().next());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>minesql-parent</artifactId>
|
||||
<groupId>cc.carm.plugin</groupId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.2.2</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>minesql-parent</artifactId>
|
||||
<groupId>cc.carm.plugin</groupId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.2.2</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>minesql-parent</artifactId>
|
||||
<groupId>cc.carm.plugin</groupId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.2.2</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>minesql-parent</artifactId>
|
||||
<groupId>cc.carm.plugin</groupId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.2.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<properties>
|
||||
|
||||
Reference in New Issue
Block a user