mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fix for null
This commit is contained in:
@@ -90,6 +90,10 @@ public abstract class LogFilter extends FilterEventAdapter implements LogFilterM
|
||||
}
|
||||
|
||||
public void configFromProperties(Properties properties) {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
String prop = properties.getProperty("druid.log.conn");
|
||||
if ("false".equals(prop)) {
|
||||
|
||||
@@ -46,6 +46,10 @@ public class DruidDataSourceStatLoggerImpl extends DruidDataSourceStatLoggerAdap
|
||||
*/
|
||||
@Override
|
||||
public void configFromProperties(Properties properties) {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String property = properties.getProperty("druid.stat.loggerName");
|
||||
if (property != null && property.length() > 0) {
|
||||
setLoggerName(property);
|
||||
|
||||
@@ -68,6 +68,10 @@ public class MySqlValidConnectionChecker extends ValidConnectionCheckerAdapter i
|
||||
|
||||
@Override
|
||||
public void configFromProperties(Properties properties) {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String property = properties.getProperty("druid.mysql.usePingMethod");
|
||||
if ("true".equals(property)) {
|
||||
setUsePingMethod(true);
|
||||
|
||||
+4
@@ -22,6 +22,10 @@ public class OceanBaseOracleExceptionSorter extends OracleExceptionSorter {
|
||||
}
|
||||
|
||||
public void configFromProperties(Properties properties) {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String property = properties.getProperty("druid.oracle.fatalErrorCodes");
|
||||
if (property != null) {
|
||||
String[] items = property.split("\\,");
|
||||
|
||||
@@ -42,6 +42,10 @@ public class OracleExceptionSorter implements ExceptionSorter, Serializable {
|
||||
}
|
||||
|
||||
public void configFromProperties(Properties properties) {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String property = properties.getProperty("druid.oracle.fatalErrorCodes");
|
||||
if (property != null) {
|
||||
String[] items = property.split("\\,");
|
||||
|
||||
@@ -42,6 +42,10 @@ public class OracleValidConnectionChecker extends ValidConnectionCheckerAdapter
|
||||
|
||||
@Override
|
||||
public void configFromProperties(Properties properties) {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String property = properties.getProperty("druid.oracle.pingTimeout");
|
||||
if (property != null && property.length() > 0) {
|
||||
int value = Integer.parseInt(property);
|
||||
|
||||
@@ -30,6 +30,10 @@ public class WallProviderStatLoggerImpl extends WallProviderStatLoggerAdapter im
|
||||
|
||||
@Override
|
||||
public void configFromProperties(Properties properties) {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String property = properties.getProperty("druid.stat.loggerName");
|
||||
if (property != null && property.length() > 0) {
|
||||
setLoggerName(property);
|
||||
|
||||
Reference in New Issue
Block a user