Polish formatting

This commit is contained in:
Phillip Webb 2016-12-19 12:37:54 -08:00
parent 4b9cba351b
commit 6121208cbb
46 changed files with 110 additions and 88 deletions

View File

@ -126,6 +126,7 @@ public class ManagementWebSecurityAutoConfiguration {
}
}
}
@Configuration

View File

@ -45,8 +45,8 @@ import org.springframework.web.util.UrlPathHelper;
*/
@ConfigurationProperties(prefix = "endpoints.jolokia", ignoreUnknownFields = false)
@HypermediaDisabled
public class JolokiaMvcEndpoint extends AbstractNamedMvcEndpoint
implements InitializingBean, ApplicationContextAware, ServletContextAware, DisposableBean {
public class JolokiaMvcEndpoint extends AbstractNamedMvcEndpoint implements
InitializingBean, ApplicationContextAware, ServletContextAware, DisposableBean {
private final ServletWrappingController controller = new ServletWrappingController();

View File

@ -64,8 +64,8 @@ public class AuthorizationAuditListener extends AbstractAuthorizationAuditListen
if (event.getAuthentication().getDetails() != null) {
data.put("details", event.getAuthentication().getDetails());
}
publish(new AuditEvent(event.getAuthentication().getName(),
AUTHORIZATION_FAILURE, data));
publish(new AuditEvent(event.getAuthentication().getName(), AUTHORIZATION_FAILURE,
data));
}
}

View File

@ -346,8 +346,8 @@ public class CrshAutoConfigurationTests {
&& authentication.getCredentials().equals(PASSWORD)) {
authentication = new UsernamePasswordAuthenticationToken(
authentication.getPrincipal(),
authentication.getCredentials(), Collections
.singleton(new SimpleGrantedAuthority("ACTUATOR")));
authentication.getCredentials(), Collections.singleton(
new SimpleGrantedAuthority("ACTUATOR")));
}
else {
throw new BadCredentialsException(

View File

@ -269,8 +269,8 @@ public class EndpointMBeanExporterTests {
MBeanExporter mbeanExporter = registerLoggersEndpoint();
Object response = mbeanExporter.getServer().invoke(
getObjectName("loggersEndpoint", this.context), "setLogLevel",
new Object[]{"com.example", "trace"},
new String[]{String.class.getName(), String.class.getName()});
new Object[] { "com.example", "trace" },
new String[] { String.class.getName(), String.class.getName() });
assertThat(response).isNull();
}
@ -280,10 +280,9 @@ public class EndpointMBeanExporterTests {
this.thrown.expect(MBeanException.class);
this.thrown.expectCause(hasMessage(containsString("No enum constant")));
this.thrown.expectCause(hasMessage(containsString("LogLevel.INVALID")));
mbeanExporter.getServer().invoke(
getObjectName("loggersEndpoint", this.context), "setLogLevel",
new Object[]{"com.example", "invalid"},
new String[]{String.class.getName(), String.class.getName()});
mbeanExporter.getServer().invoke(getObjectName("loggersEndpoint", this.context),
"setLogLevel", new Object[] { "com.example", "invalid" },
new String[] { String.class.getName(), String.class.getName() });
}
private MBeanExporter registerLoggersEndpoint() {

View File

@ -109,6 +109,7 @@ public class MvcEndpointsTests {
TestMvcEndpoint(Endpoint<?> delegate) {
super(delegate);
}
}
private static class OtherTestMvcEndpoint extends EndpointMvcAdapter {
@ -116,6 +117,7 @@ public class MvcEndpointsTests {
OtherTestMvcEndpoint(Endpoint<?> delegate) {
super(delegate);
}
}
}

View File

@ -86,8 +86,8 @@ public class AuthenticationAuditListenerTests {
AuditApplicationEvent event = handleAuthenticationEvent(
new AuthenticationSwitchUserEvent(
new UsernamePasswordAuthenticationToken("user", "password"),
new User("user", "password",
AuthorityUtils.commaSeparatedStringToAuthorityList("USER"))));
new User("user", "password", AuthorityUtils
.commaSeparatedStringToAuthorityList("USER"))));
assertThat(event.getAuditEvent().getType())
.isEqualTo(AuthenticationAuditListener.AUTHENTICATION_SWITCH);
}
@ -98,12 +98,12 @@ public class AuthenticationAuditListenerTests {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
"user", "password");
authentication.setDetails(details);
AuditApplicationEvent event = handleAuthenticationEvent(new AuthenticationFailureExpiredEvent(
authentication, new BadCredentialsException("Bad user")));
AuditApplicationEvent event = handleAuthenticationEvent(
new AuthenticationFailureExpiredEvent(authentication,
new BadCredentialsException("Bad user")));
assertThat(event.getAuditEvent().getType())
.isEqualTo(AuthenticationAuditListener.AUTHENTICATION_FAILURE);
assertThat(event.getAuditEvent().getData())
.containsEntry("details", details);
assertThat(event.getAuditEvent().getData()).containsEntry("details", details);
}
private AuditApplicationEvent handleAuthenticationEvent(

View File

@ -56,7 +56,8 @@ public class AuthorizationAuditListenerTests {
public void testAuthenticationCredentialsNotFound() {
AuditApplicationEvent event = handleAuthorizationEvent(
new AuthenticationCredentialsNotFoundEvent(this,
Collections.<ConfigAttribute>singletonList(new SecurityConfig("USER")),
Collections.<ConfigAttribute>singletonList(
new SecurityConfig("USER")),
new AuthenticationCredentialsNotFoundException("Bad user")));
assertThat(event.getAuditEvent().getType())
.isEqualTo(AuthenticationAuditListener.AUTHENTICATION_FAILURE);
@ -66,7 +67,8 @@ public class AuthorizationAuditListenerTests {
public void testAuthorizationFailure() {
AuditApplicationEvent event = handleAuthorizationEvent(
new AuthorizationFailureEvent(this,
Collections.<ConfigAttribute>singletonList(new SecurityConfig("USER")),
Collections.<ConfigAttribute>singletonList(
new SecurityConfig("USER")),
new UsernamePasswordAuthenticationToken("user", "password"),
new AccessDeniedException("Bad user")));
assertThat(event.getAuditEvent().getType())
@ -81,7 +83,8 @@ public class AuthorizationAuditListenerTests {
authentication.setDetails(details);
AuditApplicationEvent event = handleAuthorizationEvent(
new AuthorizationFailureEvent(this,
Collections.<ConfigAttribute>singletonList(new SecurityConfig("USER")),
Collections.<ConfigAttribute>singletonList(
new SecurityConfig("USER")),
authentication, new AccessDeniedException("Bad user")));
assertThat(event.getAuditEvent().getType())
.isEqualTo(AuthorizationAuditListener.AUTHORIZATION_FAILURE);

View File

@ -30,7 +30,6 @@ public enum SearchStrategy {
/**
* Search all parents and ancestors, but not the current context.
*
* @deprecated since 1.5 in favor of {@link SearchStrategy#ANCESTORS}
*/
@Deprecated PARENTS,

View File

@ -84,6 +84,7 @@ abstract class DataSourceConfiguration {
/**
* DBCP DataSource configuration.
*
* @deprecated as of Spring Boot 1.5 in favor of DBCP2
*/
@ConditionalOnClass(org.apache.commons.dbcp.BasicDataSource.class)

View File

@ -124,8 +124,8 @@ class DataSourceInitializer implements ApplicationListener<DataSourceInitialized
runScripts(scripts, username, password);
}
private List<Resource> getScripts(String propertyName,
List<String> resources, String fallback) {
private List<Resource> getScripts(String propertyName, List<String> resources,
String fallback) {
if (resources != null) {
return getResources(propertyName, resources, true);
}
@ -136,8 +136,8 @@ class DataSourceInitializer implements ApplicationListener<DataSourceInitialized
return getResources(propertyName, fallbackResources, false);
}
private List<Resource> getResources(String propertyName,
List<String> locations, boolean validate) {
private List<Resource> getResources(String propertyName, List<String> locations,
boolean validate) {
List<Resource> resources = new ArrayList<Resource>();
for (String location : locations) {
for (Resource resource : doGetResources(location)) {

View File

@ -130,6 +130,7 @@ public class JmsProperties {
? this.concurrency + "-" + this.maxConcurrency
: String.valueOf(this.concurrency));
}
}
public static class Template {

View File

@ -30,8 +30,8 @@ import org.springframework.jdbc.support.SQLExceptionTranslator;
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
/**
* Transforms {@link java.sql.SQLException} into a Spring-specific {@link
* DataAccessException}.
* Transforms {@link java.sql.SQLException} into a Spring-specific
* {@link DataAccessException}.
*
* @author Lukas Eder
* @author Andreas Ahlenstorf

View File

@ -56,7 +56,8 @@ public class ValidationAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public MethodValidationPostProcessor methodValidationPostProcessor(Validator validator) {
public MethodValidationPostProcessor methodValidationPostProcessor(
Validator validator) {
MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
processor.setValidator(validator);
return processor;

View File

@ -1554,6 +1554,7 @@ public class ServerProperties
public void setRotate(boolean rotate) {
this.rotate = rotate;
}
}
}

View File

@ -297,9 +297,8 @@ public class DataSourceInitializerTests {
PropertyPlaceholderAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:true",
"spring.datasource.schema:"
+ ClassUtils.addResourcePathToPackagePath(getClass(),
"schema.sql"),
"spring.datasource.schema:" + ClassUtils
.addResourcePathToPackagePath(getClass(), "schema.sql"),
"spring.datasource.data:classpath:does/not/exist.sql");
this.thrown.expect(BeanCreationException.class);

View File

@ -67,14 +67,15 @@ public class ValidationAutoConfigurationTests {
public void userDefinedMethodValidationPostProcessorTakesPrecedence() {
load(SampleConfiguration.class);
assertThat(this.context.getBeansOfType(Validator.class)).hasSize(1);
Object userMethodValidationPostProcessor =
this.context.getBean("testMethodValidationPostProcessor");
Object userMethodValidationPostProcessor = this.context
.getBean("testMethodValidationPostProcessor");
assertThat(this.context.getBean(MethodValidationPostProcessor.class))
.isSameAs(userMethodValidationPostProcessor);
assertThat(this.context.getBeansOfType(MethodValidationPostProcessor.class))
.hasSize(1);
assertThat(this.context.getBean(Validator.class)).isNotSameAs(
new DirectFieldAccessor(userMethodValidationPostProcessor).getPropertyValue("validator"));
assertThat(this.context.getBean(Validator.class))
.isNotSameAs(new DirectFieldAccessor(userMethodValidationPostProcessor)
.getPropertyValue("validator"));
}
public void load(Class<?> config) {

View File

@ -36,7 +36,8 @@ public class DependencyResolutionContextTests {
@Test
public void canAddSpringBootDependencies() {
DependencyResolutionContext dependencyResolutionContext = new DependencyResolutionContext();
dependencyResolutionContext.addDependencyManagement(new SpringBootDependenciesDependencyManagement());
dependencyResolutionContext.addDependencyManagement(
new SpringBootDependenciesDependencyManagement());
assertThat(dependencyResolutionContext.getManagedDependencies()).isNotEmpty();
}

View File

@ -35,7 +35,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@RunWith(SpringRunner.class)
@SpringBootTest
@TestPropertySource(properties = {"endpoints.hypermedia.enabled: true", "management.security.enabled: false"})
@TestPropertySource(properties = { "endpoints.hypermedia.enabled: true",
"management.security.enabled: false" })
public class SampleHypermediaGsonApplicationTests {
@Autowired

View File

@ -73,8 +73,8 @@ public class SampleMethodSecurityApplication extends WebMvcConfigurerAdapter {
@Override
public void init(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication().withUser("admin").password("admin")
.roles("ADMIN", "USER", "ACTUATOR").and().withUser("user").password("user")
.roles("USER");
.roles("ADMIN", "USER", "ACTUATOR").and().withUser("user")
.password("user").roles("USER");
}
}

View File

@ -25,9 +25,9 @@ import java.lang.annotation.Target;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
/**
* {@link ImportAutoConfiguration Auto-configuration imports} for typical jdbc tests.
* Most tests should consider using {@link JdbcTest @JdbcTest} rather than using
* this annotation directly.
* {@link ImportAutoConfiguration Auto-configuration imports} for typical jdbc tests. Most
* tests should consider using {@link JdbcTest @JdbcTest} rather than using this
* annotation directly.
*
* @author Stephane Nicoll
* @since 1.5.0
@ -38,4 +38,5 @@ import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
@Documented
@ImportAutoConfiguration
public @interface AutoConfigureJdbc {
}

View File

@ -49,10 +49,10 @@ class JdbcTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter {
@Override
protected ComponentScan.Filter[] getFilters(FilterType type) {
switch (type) {
case INCLUDE:
return this.annotation.includeFilters();
case EXCLUDE:
return this.annotation.excludeFilters();
case INCLUDE:
return this.annotation.includeFilters();
case EXCLUDE:
return this.annotation.excludeFilters();
}
throw new IllegalStateException("Unsupported type " + type);
}

View File

@ -34,7 +34,8 @@ import org.springframework.boot.test.autoconfigure.properties.PropertyMapping;
* instead of any application defined or auto-configured {@link DataSource}.
*
* @author Stephane Nicoll
* @deprecated since 1.5 in favour of {@link org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase}
* @deprecated since 1.5 in favour of
* {@link org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase}
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)

View File

@ -62,16 +62,14 @@ public class AutoConfigureTestDatabaseWithMultipleDatasourcesIntegrationTests {
@Primary
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
.generateUniqueName(true).setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}
@Bean
public DataSource secondaryDataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
.generateUniqueName(true).setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}

View File

@ -34,8 +34,7 @@ public class ExampleJdbcApplication {
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
.generateUniqueName(true).setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}

View File

@ -49,8 +49,9 @@ public class ExampleRepository {
}
public ExampleEntity findById(int id) {
return this.jdbcTemplate.queryForObject("select id, name from example where id =?",
new Object[] { id }, ROW_MAPPER);
return this.jdbcTemplate.queryForObject(
"select id, name from example where id =?", new Object[] { id },
ROW_MAPPER);
}
public Collection<ExampleEntity> findAll() {
@ -65,6 +66,7 @@ public class ExampleRepository {
String name = rs.getString("name");
return new ExampleEntity(id, name);
}
}
}

View File

@ -61,8 +61,7 @@ public class JdbcTestWithAutoConfigureTestDatabaseReplaceExplicitIntegrationTest
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.H2);
.generateUniqueName(true).setType(EmbeddedDatabaseType.H2);
return builder.build();
}

View File

@ -63,8 +63,7 @@ public class JdbcTestWithAutoConfigureTestDatabaseReplacePropertyAnyIntegrationT
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.H2);
.generateUniqueName(true).setType(EmbeddedDatabaseType.H2);
return builder.build();
}

View File

@ -93,8 +93,7 @@ public class TestDatabaseAutoConfigurationTests {
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
.generateUniqueName(true).setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}

View File

@ -76,8 +76,7 @@ public class DataJpaTestWithAutoConfigureTestDatabaseReplaceExplicitIntegrationT
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.H2);
.generateUniqueName(true).setType(EmbeddedDatabaseType.H2);
return builder.build();
}

View File

@ -34,8 +34,7 @@ public class ExampleDataJpaApplication {
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
.generateUniqueName(true).setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}

View File

@ -68,8 +68,7 @@ public class WebMvcTestAllControllersIntegrationTests {
@Test
public void shouldRunValidationSuccess() throws Exception {
this.mvc.perform(get("/three/OK"))
.andExpect(status().isOk())
this.mvc.perform(get("/three/OK")).andExpect(status().isOk())
.andExpect(content().string("Hello OK"));
}

View File

@ -59,7 +59,8 @@ class TypeElementMembers {
private final FieldValuesParser fieldValuesParser;
TypeElementMembers(ProcessingEnvironment env, FieldValuesParser fieldValuesParser, TypeElement element) {
TypeElementMembers(ProcessingEnvironment env, FieldValuesParser fieldValuesParser,
TypeElement element) {
this.env = env;
this.typeUtils = new TypeUtils(this.env);
this.fieldValuesParser = fieldValuesParser;

View File

@ -357,10 +357,18 @@ public class ConfigurationMetadataAnnotationProcessorTests {
ConfigurationMetadata metadata = compile(ClassWithNestedProperties.class);
assertThat(metadata).has(Metadata.withGroup("nestedChildProps")
.fromSource(ClassWithNestedProperties.NestedChildClass.class));
assertThat(metadata).has(Metadata.withProperty("nestedChildProps.child-class-property", Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class).withDefaultValue(20));
assertThat(metadata).has(Metadata.withProperty("nestedChildProps.parent-class-property", Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class).withDefaultValue(10));
assertThat(metadata)
.has(Metadata
.withProperty("nestedChildProps.child-class-property",
Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(20));
assertThat(metadata)
.has(Metadata
.withProperty("nestedChildProps.parent-class-property",
Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(10));
}
@Test

View File

@ -52,6 +52,7 @@ public class DeprecatedMethodConfig {
public void setFlag(boolean flag) {
this.flag = flag;
}
}
}

View File

@ -36,6 +36,7 @@ public class ClassWithNestedProperties {
public void setParentClassProperty(int parentClassProperty) {
this.parentClassProperty = parentClassProperty;
}
}
@ConfigurationProperties(prefix = "nestedChildProps")
@ -50,5 +51,7 @@ public class ClassWithNestedProperties {
public void setChildClassProperty(int childClassProperty) {
this.childClassProperty = childClassProperty;
}
}
}

View File

@ -392,7 +392,6 @@ public abstract class MainClassFinder {
* Creates a new {@code MainClass} rather represents the main class with the given
* {@code name}. The class is annotated with the annotations with the given
* {@code annotationNames}.
*
* @param name the name of the class
* @param annotationNames the names of the annotations on the class
*/

View File

@ -65,7 +65,8 @@ public class ExplodedArchive implements Archive {
* Create a new {@link ExplodedArchive} instance.
* @param root the root folder
* @param recursive if recursive searching should be used to locate the manifest.
* Defaults to {@code true}, folders with a large tree might want to set this to {@code
* Defaults to {@code true}, folders with a large tree might want to set this to
* {@code
* false}.
*/
public ExplodedArchive(File root, boolean recursive) {

View File

@ -412,8 +412,8 @@ public class UndertowEmbeddedServletContainerFactory
String prefix = (this.accessLogPrefix != null ? this.accessLogPrefix
: "access_log.");
AccessLogReceiver accessLogReceiver = new DefaultAccessLogReceiver(
createWorker(), this.accessLogDirectory, prefix,
this.accessLogSuffix, this.accessLogRotate);
createWorker(), this.accessLogDirectory, prefix, this.accessLogSuffix,
this.accessLogRotate);
String formatString = (this.accessLogPattern != null) ? this.accessLogPattern
: "common";
return new AccessLogHandler(handler, accessLogReceiver, formatString,

View File

@ -164,7 +164,7 @@ public enum DatabaseDriver {
* Informix.
*/
INFORMIX("informix", "Informix Dynamic Server", "com.informix.jdbc.IfxDriver", null,
"select count(*) from systables") {
"select count(*) from systables") {
@Override
protected Collection<String> getUrlPrefixes() {

View File

@ -184,6 +184,7 @@ public abstract class AbstractLoggingSystem extends LoggingSystem {
/**
* Maintains a mapping between native levels and {@link LogLevel}.
*
* @param <T> The native level type
*/
protected static class LogLevels<T> {

View File

@ -48,9 +48,9 @@ public abstract class LoggingSystem {
public static final String NONE = "none";
/**
* The name used for the root logger. LoggingSystem implementations should ensure
* that this is the name used to represent the root logger, regardless of the
* underlying implementation.
* The name used for the root logger. LoggingSystem implementations should ensure that
* this is the name used to represent the root logger, regardless of the underlying
* implementation.
*/
public static final String ROOT_LOGGER_NAME = "ROOT";

View File

@ -75,16 +75,15 @@ public class SpringPhysicalNamingStrategy implements PhysicalNamingStrategy {
}
String text = builder.toString();
String finalText = isCaseInsensitive(jdbcEnvironment) ? text.toLowerCase(Locale.ROOT)
: text;
String finalText = isCaseInsensitive(jdbcEnvironment)
? text.toLowerCase(Locale.ROOT) : text;
return new Identifier(finalText, name.isQuoted());
}
/**
* Specify whether the database is case sensitive.
* @param jdbcEnvironment The JDBC environment which can be used to determine case
* @return true if the database is case insensitive
* sensitivity
* @return true if the database is case insensitive sensitivity
*/
protected boolean isCaseInsensitive(JdbcEnvironment jdbcEnvironment) {
return true;

View File

@ -699,6 +699,7 @@ public class EnableConfigurationPropertiesTests {
}
// No getter - you should be able to bind to a write-only bean
}
// No annotation

View File

@ -176,7 +176,8 @@ public class JavaLoggingSystemTests extends AbstractLoggingSystemTests {
List<LoggerConfiguration> configurations = this.loggingSystem
.getLoggerConfigurations();
assertThat(configurations).isNotEmpty();
assertThat(configurations.get(0).getName()).isEqualTo(LoggingSystem.ROOT_LOGGER_NAME);
assertThat(configurations.get(0).getName())
.isEqualTo(LoggingSystem.ROOT_LOGGER_NAME);
}
@Test

View File

@ -70,13 +70,14 @@ public class SpringPhysicalNamingStrategyTests {
@Test
public void tableNameShouldNotBeLowerCaseIfCaseSensitive() throws Exception {
this.metadata = this.metadataSources.getMetadataBuilder(this.serviceRegistry)
.applyPhysicalNamingStrategy(new TestSpringPhysicalNamingStrategy()).build();
.applyPhysicalNamingStrategy(new TestSpringPhysicalNamingStrategy())
.build();
PersistentClass binding = this.metadata
.getEntityBinding(TelephoneNumber.class.getName());
assertThat(binding.getTable().getQuotedName()).isEqualTo("Telephone_Number");
}
private class TestSpringPhysicalNamingStrategy extends SpringPhysicalNamingStrategy {
private class TestSpringPhysicalNamingStrategy extends SpringPhysicalNamingStrategy {
@Override
protected boolean isCaseInsensitive(JdbcEnvironment jdbcEnvironment) {
@ -84,4 +85,5 @@ public class SpringPhysicalNamingStrategyTests {
}
}
}