From f876f4e24b0642c61d06f4a688ae32c61bee8aae Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Thu, 17 Jan 2013 14:23:43 -0500 Subject: [PATCH] HHH-7304 Minor cleanup --- .../action/internal/AbstractEntityInsertAction.java | 4 ++-- .../event/internal/AbstractSaveEventListener.java | 3 +-- .../test/jpa/naturalid/ClassWithIdentityColumn.java | 0 .../hibernate/test/jpa/naturalid/MutableNaturalIdTest.java | 7 +++---- 4 files changed, 6 insertions(+), 8 deletions(-) rename hibernate-core/src/{matrix => test}/java/org/hibernate/test/jpa/naturalid/ClassWithIdentityColumn.java (100%) diff --git a/hibernate-core/src/main/java/org/hibernate/action/internal/AbstractEntityInsertAction.java b/hibernate-core/src/main/java/org/hibernate/action/internal/AbstractEntityInsertAction.java index 3f6618bf60..612ffd55ed 100644 --- a/hibernate-core/src/main/java/org/hibernate/action/internal/AbstractEntityInsertAction.java +++ b/hibernate-core/src/main/java/org/hibernate/action/internal/AbstractEntityInsertAction.java @@ -195,12 +195,12 @@ public abstract class AbstractEntityInsertAction extends EntityAction { /** * Handle sending notifications needed for natural-id after saving */ - public void handleNaturalIdPostSaveNotifications(Serializable id) { + public void handleNaturalIdPostSaveNotifications(Serializable generatedId) { if (isEarlyInsert()) { // with early insert, we still need to add a local (transactional) natural id cross-reference getSession().getPersistenceContext().getNaturalIdHelper().manageLocalNaturalIdCrossReference( getPersister(), - id, + generatedId, state, null, CachedNaturalIdValueSource.INSERT diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractSaveEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractSaveEventListener.java index 7c0e108160..235e1711ce 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractSaveEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractSaveEventListener.java @@ -26,8 +26,6 @@ package org.hibernate.event.internal; import java.io.Serializable; import java.util.Map; -import org.jboss.logging.Logger; - import org.hibernate.LockMode; import org.hibernate.NonUniqueObjectException; import org.hibernate.action.internal.AbstractEntityInsertAction; @@ -51,6 +49,7 @@ import org.hibernate.persister.entity.EntityPersister; import org.hibernate.pretty.MessageHelper; import org.hibernate.type.Type; import org.hibernate.type.TypeHelper; +import org.jboss.logging.Logger; /** * A convenience bas class for listeners responding to save events. diff --git a/hibernate-core/src/matrix/java/org/hibernate/test/jpa/naturalid/ClassWithIdentityColumn.java b/hibernate-core/src/test/java/org/hibernate/test/jpa/naturalid/ClassWithIdentityColumn.java similarity index 100% rename from hibernate-core/src/matrix/java/org/hibernate/test/jpa/naturalid/ClassWithIdentityColumn.java rename to hibernate-core/src/test/java/org/hibernate/test/jpa/naturalid/ClassWithIdentityColumn.java diff --git a/hibernate-core/src/test/java/org/hibernate/test/jpa/naturalid/MutableNaturalIdTest.java b/hibernate-core/src/test/java/org/hibernate/test/jpa/naturalid/MutableNaturalIdTest.java index 13e0d0b9b3..6fb4a3480e 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/jpa/naturalid/MutableNaturalIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/jpa/naturalid/MutableNaturalIdTest.java @@ -23,14 +23,13 @@ */ package org.hibernate.test.jpa.naturalid; -import org.junit.Test; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import org.hibernate.Session; import org.hibernate.test.jpa.AbstractJPATest; import org.hibernate.testing.TestForIssue; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import org.junit.Test; /** * @author Steve Ebersole