HHH-10844 Fix test formatting

This commit is contained in:
Andrea Boriero 2020-01-27 13:42:34 +00:00
parent 85bfcc6e21
commit f1d1e62478

View File

@ -6,21 +6,12 @@
*/ */
package org.hibernate.jpa.test.jointable; package org.hibernate.jpa.test.jointable;
import org.hibernate.annotations.NaturalId; import java.io.Serializable;
import org.hibernate.cfg.AvailableSettings; import java.util.Collections;
import org.hibernate.cfg.Configuration; import java.util.Objects;
import org.hibernate.engine.query.spi.HQLQueryPlan;
import org.hibernate.hql.spi.QueryTranslator;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Embeddable; import javax.persistence.Embeddable;
import javax.persistence.Embedded;
import javax.persistence.EmbeddedId; import javax.persistence.EmbeddedId;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Inheritance; import javax.persistence.Inheritance;
import javax.persistence.InheritanceType; import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
@ -28,10 +19,13 @@
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery; import javax.persistence.NamedQuery;
import javax.persistence.SecondaryTable; import javax.persistence.SecondaryTable;
import javax.persistence.Table;
import java.io.Serializable; import org.hibernate.cfg.Configuration;
import java.util.Collections; import org.hibernate.engine.query.spi.HQLQueryPlan;
import java.util.Objects; import org.hibernate.hql.spi.QueryTranslator;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@ -81,7 +75,8 @@ public void testRegression() {
} ); } );
} }
public interface Issuer extends Resource {} public interface Issuer extends Resource {
}
@Entity(name = IssuerImpl.ENTITY_NAME) @Entity(name = IssuerImpl.ENTITY_NAME)
@SecondaryTable(name = IssuerImpl.TABLE_NAME) @SecondaryTable(name = IssuerImpl.TABLE_NAME)
@ -150,8 +145,12 @@ public Identifier(Long issuer, String identifier) {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if ( this == o ) {
if (o == null || getClass() != o.getClass()) return false; return true;
}
if ( o == null || getClass() != o.getClass() ) {
return false;
}
Identifier that = (Identifier) o; Identifier that = (Identifier) o;
return Objects.equals( issuer, that.issuer ) && return Objects.equals( issuer, that.issuer ) &&
Objects.equals( identifier, that.identifier ); Objects.equals( identifier, that.identifier );