From dba4de2d26fd68eda42e02a94b7ecc4e95fca940 Mon Sep 17 00:00:00 2001 From: Hardy Ferentschik Date: Tue, 13 Oct 2009 09:20:40 +0000 Subject: [PATCH] HHH-4415 removed the ambigous dialect instance variable in TestCase. Instead use the static method Dialect.getDialect git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17713 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../java/org/hibernate/test/annotations/TestCase.java | 8 +------- .../java/org/hibernate/test/annotations/lob/LobTest.java | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/annotations/src/test/java/org/hibernate/test/annotations/TestCase.java b/annotations/src/test/java/org/hibernate/test/annotations/TestCase.java index 3deba419d1..31f8a31111 100644 --- a/annotations/src/test/java/org/hibernate/test/annotations/TestCase.java +++ b/annotations/src/test/java/org/hibernate/test/annotations/TestCase.java @@ -37,7 +37,6 @@ public abstract class TestCase extends junit.framework.TestCase { private static SessionFactory sessions; private static AnnotationConfiguration cfg; - private static Dialect dialect; private static Class lastTestClass; private Session session; @@ -86,7 +85,6 @@ protected void buildSessionFactory(Class[] classes, String[] packages, String InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( xmlFile ); getCfg().addInputStream( is ); } - setDialect( Dialect.getDialect() ); setSessions( getCfg().buildSessionFactory( /* new TestInterceptor() */ ) ); } catch ( Exception e ) { @@ -261,12 +259,8 @@ protected SessionFactory getSessions() { return sessions; } - private void setDialect(Dialect dialect) { - TestCase.dialect = dialect; - } - protected Dialect getDialect() { - return dialect; + return Dialect.getDialect(); } protected static void setCfg(AnnotationConfiguration cfg) { diff --git a/annotations/src/test/java/org/hibernate/test/annotations/lob/LobTest.java b/annotations/src/test/java/org/hibernate/test/annotations/lob/LobTest.java index f601317c92..29e842f8b6 100644 --- a/annotations/src/test/java/org/hibernate/test/annotations/lob/LobTest.java +++ b/annotations/src/test/java/org/hibernate/test/annotations/lob/LobTest.java @@ -3,6 +3,7 @@ import org.hibernate.Session; import org.hibernate.Transaction; +import org.hibernate.dialect.Dialect; import org.hibernate.test.annotations.TestCase; /**