Author: solomax
Date: Sun Mar 2 13:24:26 2014
New Revision: 1573298
URL: http://svn.apache.org/r1573298
Log:
[OPENMEETINGS-932] getConfValue was fixed
Modified:
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
openmeetings/trunk/singlewebapp/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
Modified:
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java?rev=1573298&r1=1573297&r2=1573298&view=diff
==============================================================================
---
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
(original)
+++
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
Sun Mar 2 13:24:26 2014
@@ -117,7 +117,7 @@ public class ConfigurationDao implements
try {
List<Configuration> list = get(key);
- if (list == null || list.isEmpty()) {
+ if (list == null || list.isEmpty() || list.get(0) ==
null) {
log.warn("Could not find key in configuration
CONF_KEY: " + key);
} else {
String val = list.get(0).getConf_value();
@@ -139,9 +139,7 @@ public class ConfigurationDao implements
return c.newInstance(defaultValue);
} catch (Exception err) {
- log.error(
- "cannot be cast to return type, you
have misconfigured your configuration CONF_KEY: "
- + key, err);
+ log.error("cannot be cast to return type, you have
misconfigured your configuration CONF_KEY: " + key, err);
return null;
}
}
Modified:
openmeetings/trunk/singlewebapp/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java?rev=1573298&r1=1573297&r2=1573298&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
(original)
+++
openmeetings/trunk/singlewebapp/src/db/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
Sun Mar 2 13:24:26 2014
@@ -117,7 +117,7 @@ public class ConfigurationDao implements
try {
List<Configuration> list = get(key);
- if (list == null || list.isEmpty()) {
+ if (list == null || list.isEmpty() || list.get(0) ==
null) {
log.warn("Could not find key in configuration
CONF_KEY: " + key);
} else {
String val = list.get(0).getConf_value();
@@ -139,9 +139,7 @@ public class ConfigurationDao implements
return c.newInstance(defaultValue);
} catch (Exception err) {
- log.error(
- "cannot be cast to return type, you
have misconfigured your configuration CONF_KEY: "
- + key, err);
+ log.error("cannot be cast to return type, you have
misconfigured your configuration CONF_KEY: " + key, err);
return null;
}
}