Commit 789aa22c authored by Javier Armendáriz's avatar Javier Armendáriz
Browse files

[log4j2] Deprecating method that uses old log4j API

parent 14ee67fc
......@@ -25,7 +25,7 @@ import org.apache.ddlutils.io.DatabaseDataIO;
import org.apache.ddlutils.model.Database;
import org.apache.ddlutils.model.DatabaseData;
import org.apache.ddlutils.model.Table;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
public class OBDataset {
Vector<OBDatasetTable> tables = new Vector<OBDatasetTable>();
......@@ -175,7 +175,9 @@ public class OBDataset {
ResultSet rs = ps.getResultSet();
rs.next();
if (rs.getInt(1) > 0) {
log.warn("Change detected in table: " + table.getName());
if (log != null) {
log.warn("Change detected in table: " + table.getName());
}
if (modifiedTables != null) {
modifiedTables.add(table.getName());
}
......@@ -191,6 +193,22 @@ public class OBDataset {
return hasChanges;
}
/**
* @deprecated Use with log4j2 logger: hasChanged(Connection, org.apache.logging.log4j.Logger)
*/
@Deprecated
public boolean hasChanged(Connection connection, org.apache.log4j.Logger log) {
return hasChanged(connection, (Logger) null, null);
}
/**
* @deprecated Use with log4j2 logger: hasChanged(Connection, org.apache.logging.log4j.Logger, List<String>)
*/
@Deprecated
public boolean hasChanged(Connection connection, org.apache.log4j.Logger log, List<String> modifiedTables) {
return hasChanged(connection, (Logger) null, modifiedTables);
}
public void setTables(Vector<OBDatasetTable> tables2) {
this.tables = tables2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment