HHH-10507 - Hibernate core test removing usage of Java 8 methods

This commit is contained in:
Andrea Boriero 2016-02-09 17:00:27 +00:00
parent 599df2405b
commit 44e4608fd5
3 changed files with 6 additions and 3 deletions

View File

@ -10,6 +10,7 @@ import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.File;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.List;
@ -57,7 +58,7 @@ public class SchemaUpdateDelimiterTest {
su.setFormat( false );
su.execute( Target.SCRIPT );
List<String> sqlLines = Files.readAllLines( output.toPath() );
List<String> sqlLines = Files.readAllLines( output.toPath(), Charset.defaultCharset() );
for ( String line : sqlLines ) {
assertThat(
"The expected delimiter is not applied " + line,

View File

@ -8,6 +8,7 @@ package org.hibernate.test.schemaupdate.foreignkeys;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.List;
@ -155,7 +156,7 @@ public class ForeignKeyGenerationTest extends BaseUnitTestCase {
private void checkAlterTableStatement(AlterTableStatement alterTableStatement)
throws Exception {
final String expectedAlterTableStatement = alterTableStatement.toSQL();
final List<String> sqlLines = Files.readAllLines( output.toPath() );
final List<String> sqlLines = Files.readAllLines( output.toPath(), Charset.defaultCharset() );
boolean found = false;
for ( String line : sqlLines ) {
if ( line.contains( expectedAlterTableStatement ) ) {

View File

@ -8,6 +8,7 @@ package org.hibernate.test.schemaupdate.foreignkeys.crossschema;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.Arrays;
import java.util.Collections;
@ -73,7 +74,7 @@ public class CrossSchemaForeignKeyGenerationTest extends BaseUnitTestCase {
.setFormat( false );
schemaExport.create( true, false );
final List<String> sqlLines = Files.readAllLines( output.toPath() );
final List<String> sqlLines = Files.readAllLines( output.toPath(), Charset.defaultCharset() );
assertThat(
"Expected alter table SCHEMA1.Child add constraint but is : " + sqlLines.get( 4 ),
sqlLines.get( 4 ).startsWith( "alter table " ),