Skip to content

Commit 99660eb

Browse files
committed
HBX-2868: Replace use of deprecated constructor 'org.hibernate.mapping.Table#Table()
Signed-off-by: Koen Aers <[email protected]>
1 parent dab2e39 commit 99660eb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

orm/src/main/java/org/hibernate/tool/internal/reveng/RevengMetadataCollector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void addSuggestedIdentifierStrategy(String catalog, String schema, String
8080
}
8181

8282
private Table createTable(String catalog, String schema, String name) {
83-
Table table = new Table();
83+
Table table = new Table("Hibernate Tools");
8484
table.setAbstract(false);
8585
table.setName(name);
8686
table.setSchema(schema);

orm/src/main/java/org/hibernate/tool/internal/reveng/strategy/OverrideBinder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static void bindTables(
7575
ArrayList<Element> tables,
7676
OverrideRepository repository) {
7777
for (Element element : tables) {
78-
Table table = new Table();
78+
Table table = new Table("Hibernate Tools");
7979
table.setCatalog(getAttribute(element, "catalog"));
8080
table.setSchema(getAttribute(element, "schema"));
8181
table.setName(getAttribute(element, "name"));
@@ -154,7 +154,7 @@ private static List<String> bindColumns(
154154
List<Column> localColumns = new ArrayList<Column>();
155155
localColumns.add(column);
156156
List<Column> foreignColumns = new ArrayList<Column>();
157-
Table foreignTable = new Table();
157+
Table foreignTable = new Table("Hibernate Tools");
158158
foreignTable.setName(foreignTableName);
159159
foreignTable.setCatalog(
160160
element.hasAttribute("foreign-catalog") ?
@@ -192,7 +192,7 @@ private static void bindForeignKeys(
192192
String constraintName = getAttribute(element, "constraint-name");
193193
String foreignTableName = getAttribute(element, "foreign-table");
194194
if (foreignTableName != null) {
195-
Table foreignTable = new Table();
195+
Table foreignTable = new Table("hibernate tools");
196196
foreignTable.setName(foreignTableName);
197197
foreignTable.setCatalog(
198198
element.hasAttribute("foreign-catalog") ?

test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class HibernateUtilTest {
4545

4646
@Test
4747
public void testGetForeignKey() {
48-
Table table = new Table();
48+
Table table = new Table("Hibernate Tools");
4949
assertNull(HibernateUtil.getForeignKey(table, "foo"));
5050
assertNull(HibernateUtil.getForeignKey(table, "bar"));
5151
table.createForeignKey("foo", Collections.emptyList(), "Bar", null);

0 commit comments

Comments
 (0)