mirror of
https://github.com/CarmJos/MineSQL.git
synced 2024-09-19 12:15:45 +00:00
fix(get): 修复获取首个Manager会出现报错的问题
This commit is contained in:
parent
6456f0d2fe
commit
3c45eb29bf
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user