mirror of
https://github.com/CarmJos/MineSQL.git
synced 2024-09-19 20:25:45 +00:00
fix(get): 修复获取首个Manager会出现报错的问题
This commit is contained in:
parent
6456f0d2fe
commit
3c45eb29bf
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>minesql-parent</artifactId>
|
<artifactId>minesql-parent</artifactId>
|
||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>minesql-parent</artifactId>
|
<artifactId>minesql-parent</artifactId>
|
||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -21,7 +21,9 @@ public class MineSQLRegistry implements SQLRegistry {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull Optional<@Nullable SQLManager> getOptional(@Nullable String id) {
|
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
|
@Override
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>minesql-parent</artifactId>
|
<artifactId>minesql-parent</artifactId>
|
||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>minesql-parent</artifactId>
|
<artifactId>minesql-parent</artifactId>
|
||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>minesql-parent</artifactId>
|
<artifactId>minesql-parent</artifactId>
|
||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>minesql-parent</artifactId>
|
<artifactId>minesql-parent</artifactId>
|
||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<properties>
|
<properties>
|
||||||
|
2
pom.xml
2
pom.xml
@ -24,7 +24,7 @@
|
|||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<artifactId>minesql-parent</artifactId>
|
<artifactId>minesql-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>1.2.1</version>
|
<version>1.2.2</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>api</module>
|
<module>api</module>
|
||||||
<module>core</module>
|
<module>core</module>
|
||||||
|
Loading…
Reference in New Issue
Block a user