fix review remark

This commit is contained in:
Nikolay Shestakov 2013-01-20 00:04:42 +06:00 committed by Brett Meyer
parent 5cc0864562
commit 7c6d65f938
3 changed files with 6 additions and 3 deletions

View File

@ -1538,8 +1538,7 @@ public class Configuration implements Serializable {
Set<Column> unboundNoLogical = new HashSet<Column>();
for ( int index = 0; index < size; index++ ) {
String column = columnNames[index];
boolean columnNameValid = !StringHelper.isEmpty(column);
final String logicalColumnName = columnNameValid ? normalizer.normalizeIdentifierQuoting( column ) : "";
final String logicalColumnName = StringHelper.isNotEmpty( column ) ? normalizer.normalizeIdentifierQuoting( column ) : "";
try {
final String columnName = createMappings().getPhysicalColumnName( logicalColumnName, table );
columns[index] = new Column( columnName );

View File

@ -84,7 +84,7 @@ public class Column implements Selectable, Serializable, Cloneable {
}
public void setName(String name) {
if (
!name.isEmpty() &&
StringHelper.isNotEmpty( name ) &&
Dialect.QUOTE.indexOf( name.charAt(0) ) > -1 //TODO: deprecated, remove eventually
) {
quoted=true;

View File

@ -15,6 +15,10 @@ import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseUnitTestCase;
import org.junit.Test;
/**
* @author Nikolay Shestakov
*
*/
public class UniqueConstraintValidationTest extends BaseUnitTestCase {
@Test(expected = AnnotationException.class)