HHH-14601 fix the typo of `extracter`

This commit is contained in:
Nathan Xu 2020-09-23 11:04:20 -04:00 committed by Steve Ebersole
parent 26ccd0c36d
commit 0f683ff25d
10 changed files with 21 additions and 21 deletions

View File

@ -18,12 +18,12 @@ import org.hibernate.exception.spi.ViolatedConstraintNameExtractor;
*/
@Deprecated
public class SQLStateConverter extends StandardSQLExceptionConverter implements SQLExceptionConverter {
public SQLStateConverter(final ViolatedConstraintNameExtractor extracter) {
public SQLStateConverter(final ViolatedConstraintNameExtractor extractor) {
super();
final ConversionContext conversionContext = new ConversionContext() {
@Override
public ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor() {
return extracter;
return extractor;
}
};
addDelegate( new SQLStateConversionDelegate( conversionContext ) );

View File

@ -6,7 +6,7 @@
*/
package org.hibernate.tool.hbm2ddl;
import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtracter;
import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtractor;
/**
* Class responsible for extracting SQL statements from import script. Supports instructions/comments and quoted
@ -14,8 +14,8 @@ import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtracter;
*
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
*
* @deprecated Use {@link MultiLineSqlScriptExtracter} instead
* @deprecated Use {@link MultiLineSqlScriptExtractor} instead
*/
@Deprecated
public class MultipleLinesSqlCommandExtractor extends MultiLineSqlScriptExtracter {
public class MultipleLinesSqlCommandExtractor extends MultiLineSqlScriptExtractor {
}

View File

@ -31,13 +31,13 @@ public abstract class AbstractScriptSourceInput implements ScriptSourceInput {
protected abstract void releaseReader(Reader reader);
@Override
public List<String> extract(Function<Reader, List<String>> extracter) {
public List<String> extract(Function<Reader, List<String>> extractor) {
log.executingImportScript( getScriptDescription() );
final Reader inputReader = prepareReader();
try {
return extracter.apply( inputReader );
return extractor.apply( inputReader );
}
finally {
releaseReader( inputReader );

View File

@ -25,7 +25,7 @@ public class ScriptSourceInputNonExistentImpl implements ScriptSourceInput {
public static final ScriptSourceInputNonExistentImpl INSTANCE = new ScriptSourceInputNonExistentImpl();
@Override
public List<String> extract(Function<Reader, List<String>> extracter) {
public List<String> extract(Function<Reader, List<String>> extractor) {
return Collections.emptyList();
}
}

View File

@ -34,10 +34,10 @@ import org.antlr.v4.runtime.misc.ParseCancellationException;
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
* @author Steve Ebersole
*/
public class MultiLineSqlScriptExtracter implements SqlScriptCommandExtractor {
public class MultiLineSqlScriptExtractor implements SqlScriptCommandExtractor {
public static final String SHORT_NAME = "multi-line";
public static final MultiLineSqlScriptExtracter INSTANCE = new MultiLineSqlScriptExtracter();
public static final MultiLineSqlScriptExtractor INSTANCE = new MultiLineSqlScriptExtractor();
@Override
public List<String> extractCommands(Reader reader, Dialect dialect) {

View File

@ -43,8 +43,8 @@ public class SqlScriptExtractorInitiator implements StandardServiceInitiator<Sql
if ( explicitSettingName.isEmpty() || SingleLineSqlScriptExtractor.SHORT_NAME.equals( explicitSettingName ) ) {
return SingleLineSqlScriptExtractor.INSTANCE;
}
else if ( MultiLineSqlScriptExtracter.SHORT_NAME.equals( explicitSettingName ) ) {
return MultiLineSqlScriptExtracter.INSTANCE;
else if ( MultiLineSqlScriptExtractor.SHORT_NAME.equals( explicitSettingName ) ) {
return MultiLineSqlScriptExtractor.INSTANCE;
}
final ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );

View File

@ -20,5 +20,5 @@ public interface ScriptSourceInput {
/**
* Allows managed access to the input's Reader, returning a result
*/
List<String> extract(Function<Reader,List<String>> extracter);
List<String> extract(Function<Reader,List<String>> extractor);
}

View File

@ -13,7 +13,7 @@ import java.io.StringReader;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtracter;
import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtractor;
import org.junit.jupiter.api.Test;
@ -44,7 +44,7 @@ public class SchemaManagementScriptTests {
final String commands = firstCommand + "; " + secondCommand + "; " + thirdCommand + ";";
final Reader reader = new BufferedReader( new StringReader( commands ) );
final MultiLineSqlScriptExtracter extractor = new MultiLineSqlScriptExtracter();
final MultiLineSqlScriptExtractor extractor = new MultiLineSqlScriptExtractor();
final String[] extractedCommands = extractor.extractCommands( reader, dialect ).toArray( new String[0] );
assertThat( extractedCommands.length, is( 3 ) );
@ -62,7 +62,7 @@ public class SchemaManagementScriptTests {
final String commands = firstCommand + "; " + secondCommand + "; " + thirdCommand + ";";
final Reader reader = new BufferedReader( new StringReader( commands ) );
final MultiLineSqlScriptExtracter extractor = new MultiLineSqlScriptExtracter();
final MultiLineSqlScriptExtractor extractor = new MultiLineSqlScriptExtractor();
final String[] extractedCommands = extractor.extractCommands( reader, dialect ).toArray( new String[0] );
assertThat( extractedCommands.length, is( 3 ) );
@ -84,7 +84,7 @@ public class SchemaManagementScriptTests {
final String commands = firstCommand + "; " + secondCommand + "; " + thirdCommand + ";";
final Reader reader = new BufferedReader( new StringReader( commands ) );
final MultiLineSqlScriptExtracter extractor = new MultiLineSqlScriptExtracter();
final MultiLineSqlScriptExtractor extractor = new MultiLineSqlScriptExtractor();
final String[] extractedCommands = extractor.extractCommands( reader, dialect ).toArray( new String[0] );
assertThat( extractedCommands.length, is( 3 ) );

View File

@ -10,7 +10,7 @@ import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtracter;
import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtractor;
import org.hibernate.tool.schema.spi.SqlScriptCommandExtractor;
import org.hibernate.testing.RequiresDialect;
@ -36,6 +36,6 @@ public class CommandExtractorServiceTest extends MultiLineImportFileTest {
@Override
protected void prepareBasicRegistryBuilder(StandardServiceRegistryBuilder serviceRegistryBuilder) {
super.prepareBasicRegistryBuilder( serviceRegistryBuilder );
serviceRegistryBuilder.addService( SqlScriptCommandExtractor.class, MultiLineSqlScriptExtracter.INSTANCE );
serviceRegistryBuilder.addService( SqlScriptCommandExtractor.class, MultiLineSqlScriptExtractor.INSTANCE );
}
}

View File

@ -23,7 +23,7 @@ import org.hibernate.tool.schema.SourceType;
import org.hibernate.tool.schema.TargetType;
import org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl;
import org.hibernate.tool.schema.internal.SchemaCreatorImpl;
import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtracter;
import org.hibernate.tool.schema.internal.script.MultiLineSqlScriptExtractor;
import org.hibernate.tool.schema.spi.ContributableMatcher;
import org.hibernate.tool.schema.spi.ExceptionHandler;
import org.hibernate.tool.schema.spi.ExecutionOptions;
@ -76,7 +76,7 @@ public class StatementsWithoutTerminalCharsImportFileTest extends BaseUnitTestCa
// specify anything as single-line is the default
.applySetting(
Environment.HBM2DDL_IMPORT_FILES_SQL_EXTRACTOR,
MultiLineSqlScriptExtracter.INSTANCE
MultiLineSqlScriptExtractor.INSTANCE
)
.build();
}