@@ -68,7 +68,7 @@ public String generateHashedFkName(
68
68
Identifier ... columnNames ) {
69
69
// Use a concatenation that guarantees uniqueness, even if identical
70
70
// names exist between all table and column identifiers.
71
- final StringBuilder sb = new StringBuilder ()
71
+ final StringBuilder text = new StringBuilder ()
72
72
.append ( "table`" ).append ( tableName ).append ( "`" )
73
73
.append ( "references`" ).append ( referencedTableName ).append ( "`" );
74
74
// Ensure a consistent ordering of columns, regardless of the order
@@ -78,9 +78,10 @@ public String generateHashedFkName(
78
78
final Identifier [] alphabeticalColumns = columnNames .clone ();
79
79
Arrays .sort ( alphabeticalColumns , comparing ( Identifier ::getCanonicalName ) );
80
80
for ( Identifier columnName : alphabeticalColumns ) {
81
- sb .append ( "column`" ).append ( columnName ).append ( "`" );
81
+ assert columnName != null ;
82
+ text .append ( "column`" ).append ( columnName ).append ( "`" );
82
83
}
83
- return prefix + hashedName ( sb .toString () );
84
+ return prefix + hashedName ( text .toString () );
84
85
}
85
86
86
87
/**
@@ -93,17 +94,18 @@ public String generateHashedConstraintName(
93
94
String prefix , Identifier tableName , Identifier ... columnNames ) {
94
95
// Use a concatenation that guarantees uniqueness, even if identical
95
96
// names exist between all table and column identifiers.
96
- final StringBuilder sb = new StringBuilder ( "table`" + tableName + "`" );
97
+ final StringBuilder text = new StringBuilder ( "table`" + tableName + "`" );
97
98
// Ensure a consistent ordering of columns, regardless of the order
98
99
// they were bound.
99
100
// Clone the list, as sometimes a set of order-dependent Column
100
101
// bindings are given.
101
102
final Identifier [] alphabeticalColumns = columnNames .clone ();
102
103
Arrays .sort ( alphabeticalColumns , comparing (Identifier ::getCanonicalName ) );
103
104
for ( Identifier columnName : alphabeticalColumns ) {
104
- sb .append ( "column`" ).append ( columnName ).append ( "`" );
105
+ assert columnName != null ;
106
+ text .append ( "column`" ).append ( columnName ).append ( "`" );
105
107
}
106
- return prefix + hashedName ( sb .toString () );
108
+ return prefix + hashedName ( text .toString () );
107
109
}
108
110
109
111
/**
0 commit comments