Skip to content

Commit

Permalink
remove unused variables, fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Dec 21, 2018
1 parent 683501d commit 53fbc2a
Showing 1 changed file with 10 additions and 14 deletions.
Expand Up @@ -112,21 +112,20 @@ public boolean start(Table table) {
throw new NullPointerException("Cannot load a null table");
}
this.lastData = null;
this.sourceTable = table;
this.sourceTable = table;
try {
this.targetTable = lookupTableAtTarget(this.sourceTable);
}
catch (SqlException sqle) {
log.warn("Unable to read target table." ,sqle.getMessage());
this.targetTable = lookupTableAtTarget(this.sourceTable);
} catch (SqlException sqle) {
log.warn("Unable to read target table.", sqle.getMessage());
}
if (this.targetTable == null && this instanceof DynamicDefaultDatabaseWriter) {
if (((DynamicDefaultDatabaseWriter)this).isLoadOnly()) {
this.targetTable = table;
}
}
if (((DynamicDefaultDatabaseWriter) this).isLoadOnly()) {
this.targetTable = table;
}
}

this.sourceTable.copyColumnTypesFrom(this.targetTable);
if (this.targetTable==null && hasFilterThatHandlesMissingTable(table)) {
if (this.targetTable == null && hasFilterThatHandlesMissingTable(table)) {
this.targetTable = table;
}

Expand Down Expand Up @@ -231,10 +230,8 @@ public void write(CsvData data) {
rollback();
throw ex;
} catch (RuntimeException ex) {
DatabaseWriterSettings writerSettings = getWriterSettings();
Statistics batchStatistics = getStatistics().get(getBatch());
long statementCount = batchStatistics.get(DataWriterStatisticConstants.ROWCOUNT);
long lineNumber = batchStatistics.get(DataWriterStatisticConstants.LINENUMBER);
ResolvedData resolvedData = getWriterSettings().getResolvedData(statementCount);

if (conflictResolver != null && conflictResolver.isIgnoreRow(this, data)) {
Expand Down Expand Up @@ -580,6 +577,5 @@ public Map<Batch, Statistics> getStatistics() {
public DatabaseWriterSettings getWriterSettings() {
return writerSettings;
}


}

0 comments on commit 53fbc2a

Please sign in to comment.