This is an automated email from the ASF dual-hosted git repository. thurka pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push: new 29b88adab0 make sure that there is database connection - getDialect() needs it new 2fde2b4fd6 Merge pull request #6609 from thurka/GCN-3613 29b88adab0 is described below commit 29b88adab0979f8c194276bfd0c51779a02baccb Author: Tomas Hurka <tomas.hu...@gmail.com> AuthorDate: Mon Oct 23 14:13:59 2023 +0200 make sure that there is database connection - getDialect() needs it --- .../src/org/netbeans/modules/micronaut/db/MicronautRepository.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/enterprise/micronaut/src/org/netbeans/modules/micronaut/db/MicronautRepository.java b/enterprise/micronaut/src/org/netbeans/modules/micronaut/db/MicronautRepository.java index 1bb29e08ec..4bea0889a0 100644 --- a/enterprise/micronaut/src/org/netbeans/modules/micronaut/db/MicronautRepository.java +++ b/enterprise/micronaut/src/org/netbeans/modules/micronaut/db/MicronautRepository.java @@ -117,6 +117,11 @@ public class MicronautRepository implements TemplateWizard.Iterator { DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(Bundle.MSG_NoDdSupport(folder.getPath()), NotifyDescriptor.ERROR_MESSAGE)); return Collections.emptyList(); } + DatabaseConnection connection = ConnectionManager.getDefault().getPreferredConnection(true); + if (connection == null) { + DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(Bundle.MSG_NoDbConn(), NotifyDescriptor.ERROR_MESSAGE)); + return Collections.emptyList(); + } final boolean jpaSupported = Utils.isJPASupported(sourceGroup); final Map<String, String> entity2idTypes = getEntityClasses(sourceGroup, jpaSupported); final List<NotifyDescriptor.QuickPick.Item> entities = new ArrayList<>(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists