Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sualeh committed Apr 23, 2023
1 parent dde3dde commit 1f8021e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ private Collection<ImmutableDatabaseProperty> retrieveResultSetTypesProperties(
Level.FINE,
e.getCause(),
new StringFormat("Could not execute method <%s>", methodName));
continue;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@

import static java.util.Objects.requireNonNull;
import static us.fatehi.utility.Utility.isBlank;

import java.util.Optional;
import java.util.logging.Level;
import java.util.logging.Logger;

import schemacrawler.schema.Catalog;
import schemacrawler.schema.Column;
import schemacrawler.schema.Schema;
Expand All @@ -52,11 +50,9 @@ static String constructForeignKeyName(final Table pkTable, final Table fkTable)
requireNonNull(pkTable, "No referenced table provided");
requireNonNull(fkTable, "No referencing table provided");

final String foreignKeyName =
String.format(
"SCHCRWLR_%1$08X_%2$08X",
fkTable.getFullName().hashCode(), pkTable.getFullName().hashCode());
return foreignKeyName;
return String.format(
"SCHCRWLR_%1$08X_%2$08X",
fkTable.getFullName().hashCode(), pkTable.getFullName().hashCode());
}

static Column lookupOrCreateColumn(
Expand All @@ -78,9 +74,9 @@ static Column lookupOrCreateColumn(

if (column == null) {
// Create the table and column, but do not add it to the schema
final Table table = new TablePartial(schema, tableName);
final TablePartial table = new TablePartial(schema, tableName);
column = new ColumnPartial(table, columnName);
((TablePartial) table).addColumn(column);
table.addColumn(column);

LOGGER.log(
Level.FINER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@
import static schemacrawler.schemacrawler.InformationSchemaKey.TRIGGERS;
import static schemacrawler.schemacrawler.InformationSchemaKey.VIEWS;
import static schemacrawler.schemacrawler.InformationSchemaKey.VIEW_TABLE_USAGE;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Optional;
import java.util.logging.Level;
import java.util.logging.Logger;

import schemacrawler.plugin.EnumDataTypeHelper;
import schemacrawler.plugin.EnumDataTypeInfo;
import schemacrawler.schema.ActionOrientationType;
Expand Down Expand Up @@ -112,7 +110,6 @@ void retrieveAdditionalColumnAttributes() throws SQLException {
new StringFormat(
"Cannot find column <%s.%s.%s.%s>",
catalogName, schemaName, tableName, columnName));
continue;
} else {
final MutableColumn column = columnOptional.get();
column.addAttributes(results.getAttributes());
Expand Down

0 comments on commit 1f8021e

Please sign in to comment.