File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed
hibernate-core/src/test/java/org/hibernate/dialect
hibernate-testing/src/main/java/org/hibernate/testing/orm/junit Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Hibernate, Relational Persistence for Idiomatic Java
3+ *
4+ * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5+ * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
6+ */
7+ package org .hibernate .dialect ;
8+
9+ import static org .assertj .core .api .Assertions .assertThat ;
10+
11+ import org .hibernate .testing .orm .junit .DialectContext ;
12+ import org .junit .Test ;
13+
14+ public class DialectContextTest {
15+
16+ @ Test
17+ public void smoke () {
18+ Dialect current = DialectContext .getDialect ();
19+ assertThat ( current ).isNotNull ();
20+ }
21+ }
Original file line number Diff line number Diff line change 1414import org .hibernate .HibernateException ;
1515import org .hibernate .cfg .Environment ;
1616import org .hibernate .dialect .Dialect ;
17- import org .hibernate .engine .jdbc .dialect .spi .DatabaseMetaDataDialectResolutionInfoAdapter ;
18- import org .hibernate .engine .jdbc .dialect .spi .DialectResolutionInfo ;
1917import org .hibernate .internal .util .ReflectHelper ;
2018
2119/**
@@ -33,13 +31,13 @@ static void init() {
3331 }
3432 try {
3533 final Class <? extends Dialect > dialectClass = ReflectHelper .classForName ( dialectName );
36- final Constructor <? extends Dialect > constructor = dialectClass .getConstructor ( DialectResolutionInfo . class );
34+ final Constructor <? extends Dialect > constructor = dialectClass .getConstructor ();
3735 Driver driver = (Driver ) Class .forName ( properties .getProperty ( Environment .DRIVER ) ).newInstance ();
3836 Properties props = new Properties ();
3937 props .setProperty ( "user" , properties .getProperty ( Environment .USER ) );
4038 props .setProperty ( "password" , properties .getProperty ( Environment .PASS ) );
4139 try (Connection connection = driver .connect ( properties .getProperty ( Environment .URL ), props )) {
42- dialect = constructor .newInstance ( new DatabaseMetaDataDialectResolutionInfoAdapter ( connection . getMetaData () ) );
40+ dialect = constructor .newInstance ();
4341 }
4442 }
4543 catch (ClassNotFoundException cnfe ) {
You can’t perform that action at this time.
0 commit comments