File tree Expand file tree Collapse file tree
src/main/java/com/mengcraft/simpleorm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ public void initialize() throws DatabaseException {
214214 if (!(server == null )) {
215215 throw new DatabaseException ("Already initialized!" );
216216 }
217- if (mapping .size () < 1 ) {
217+ if (mapping .isEmpty () ) {
218218 throw new DatabaseException ("Not define entity class!" );
219219 }
220220
@@ -384,7 +384,8 @@ public void shutdown() throws DatabaseException {
384384 val i = clz .getDeclaredConstructor (DefaultServer .class );
385385 i .setAccessible (true );
386386 ((Runnable ) i .newInstance (server )).run ();
387- if (dataSource instanceof HikariDataSource && !((HikariDataSource ) dataSource ).getPoolName ().equals ("simple_shared" )) {// Never shutdown shared
387+ if (dataSource instanceof HikariDataSource &&
388+ ((HikariDataSource ) dataSource ).getPoolName ().equals (name )) {// Never shutdown shared
388389 ((HikariDataSource ) dataSource ).close ();
389390 }
390391 if (managed ) {
You can’t perform that action at this time.
0 commit comments