bug fix for null

This commit is contained in:
高铁
2021-09-19 20:10:45 +08:00
parent dc56744354
commit 619c3b607c
7 changed files with 28 additions and 0 deletions
@@ -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);
@@ -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);