Skip to content

Commit fc0d1cb

Browse files
committed
#1260 Fix issue with empty JNDI name
Only create JndiObjectFactoryBean when `jndiName` is not null or empty.
1 parent 0b8f49c commit fc0d1cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grails-datastore-gorm/src/main/groovy/org/grails/datastore/gorm/jdbc/connections/DataSourceConnectionSourceFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected <F extends ConnectionSourceSettings> DataSourceSettings buildSettings(
4747
public ConnectionSource<DataSource, DataSourceSettings> create(String name, DataSourceSettings settings) {
4848

4949
DataSource dataSource;
50-
if(settings.getJndiName() != null) {
50+
if(settings.getJndiName() != null && !settings.getJndiName().isEmpty()) {
5151
JndiObjectFactoryBean jndiObjectFactoryBean = new JndiObjectFactoryBean();
5252
jndiObjectFactoryBean.setExpectedType(DataSource.class);
5353
jndiObjectFactoryBean.setJndiName(settings.getJndiName());

0 commit comments

Comments
 (0)