Closes gh-4537
pull/4537/merge
Johnny Lim 9 years ago committed by Stephane Nicoll
parent 6146817ba3
commit 36ed0f5c20

@ -74,27 +74,27 @@ class AutoConfigurationSorter {
private List<String> sortByAnnotation(AutoConfigurationClasses classes,
List<String> classNames) {
List<String> tosort = new ArrayList<String>(classNames);
List<String> toSort = new ArrayList<String>(classNames);
Set<String> sorted = new LinkedHashSet<String>();
Set<String> processing = new LinkedHashSet<String>();
while (!tosort.isEmpty()) {
doSortByAfterAnnotation(classes, tosort, sorted, processing, null);
while (!toSort.isEmpty()) {
doSortByAfterAnnotation(classes, toSort, sorted, processing, null);
}
return new ArrayList<String>(sorted);
}
private void doSortByAfterAnnotation(AutoConfigurationClasses classes,
List<String> tosort, Set<String> sorted, Set<String> processing,
List<String> toSort, Set<String> sorted, Set<String> processing,
String current) {
if (current == null) {
current = tosort.remove(0);
current = toSort.remove(0);
}
processing.add(current);
for (String after : classes.getClassesRequestedAfter(current)) {
Assert.state(!processing.contains(after),
"AutoConfigure cycle detected between " + current + " and " + after);
if (!sorted.contains(after) && tosort.contains(after)) {
doSortByAfterAnnotation(classes, tosort, sorted, processing, after);
if (!sorted.contains(after) && toSort.contains(after)) {
doSortByAfterAnnotation(classes, toSort, sorted, processing, after);
}
}
processing.remove(current);

@ -198,7 +198,7 @@ public class JobLauncherCommandLineRunner
}
execute(job, jobParameters);
}
catch (NoSuchJobException nsje) {
catch (NoSuchJobException ex) {
logger.debug("No job found in registry for job name: " + jobName);
continue;
}

@ -48,7 +48,7 @@ public class FlywayMigrationInitializer implements InitializingBean, Ordered {
/**
* Create a new {@link FlywayMigrationInitializer} instance.
* @param flyway the flyway instance
* @param migrationStrategy the migration stragety or {@code null}
* @param migrationStrategy the migration strategy or {@code null}
*/
public FlywayMigrationInitializer(Flyway flyway,
FlywayMigrationStrategy migrationStrategy) {

@ -46,7 +46,7 @@ import org.springframework.web.servlet.view.groovy.GroovyMarkupConfigurer;
import org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver;
/**
* Autoconfiguration support for Groovy templates in MVC. By default creates a
* Auto-configuration support for Groovy templates in MVC. By default creates a
* {@link MarkupTemplateEngine} configured from {@link GroovyTemplateProperties}, but you
* can override that by providing your own {@link GroovyMarkupConfig} or even a
* {@link MarkupTemplateEngine} of a different type.

@ -75,12 +75,12 @@ enum DatabaseDriver {
ORACLE("oracle.jdbc.OracleDriver", "oracle.jdbc.xa.client.OracleXADataSource"),
/**
* Postres.
* Postgres.
*/
POSTGRESQL("org.postgresql.Driver", "org.postgresql.xa.PGXADataSource"),
/**
* JTDS.
* jTDS.
*/
JTDS("net.sourceforge.jtds.jdbc.Driver"),

@ -118,7 +118,7 @@ public enum EmbeddedDatabaseConnection {
* database type.
*
* @param dataSource the data source to interrogate
* @return true if the data sourceis one of the embedded types
* @return true if the data source is one of the embedded types
*/
public static boolean isEmbedded(DataSource dataSource) {
try {

@ -19,7 +19,7 @@ package org.springframework.boot.autoconfigure.jdbc.metadata;
import javax.sql.DataSource;
/**
* Provides access meta-data that is commonly available from most polled
* Provides access meta-data that is commonly available from most pooled
* {@link DataSource} implementations.
*
* @author Stephane Nicoll

@ -37,7 +37,7 @@ public class DataSourcePoolMetadataProviders implements DataSourcePoolMetadataPr
/**
* Create a {@link DataSourcePoolMetadataProviders} instance with an initial
* collection of delegates to use.
* @param providers the data source pool metdata providers
* @param providers the data source pool metadata providers
*/
public DataSourcePoolMetadataProviders(
Collection<? extends DataSourcePoolMetadataProvider> providers) {

@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
* Configuration used to create the embedded Artemis server.
*
* @author Eddú Meléndez
* @author Stephane Nicol
* @author Stephane Nicoll
* @author Phillip Webb
*/
class ArtemisEmbeddedConfigurationFactory {

@ -31,7 +31,7 @@ import org.springframework.boot.autoconfigure.jms.hornetq.HornetQProperties.Embe
/**
* Factory class to create a HornetQ {@link Configuration} from {@link HornetQProperties}.
*
* @author Stephane Nicol
* @author Stephane Nicoll
* @author Phillip Webb
* @since 1.1.0
*/

@ -114,7 +114,7 @@ public class HibernateJpaAutoConfiguration extends JpaBaseConfiguration {
if (jtaTransactionManager != null) {
if (runningOnWebSphere()) {
// We can never use SpringJtaPlatform on WebSphere as
// WebSphereUowTransactionManger has a null TransactionManager
// WebSphereUowTransactionManager has a null TransactionManager
// which will cause Hibernate to NPE
configureWebSphereTransactionPlatform(vendorProperties);
}

@ -15,6 +15,6 @@
*/
/**
* Auto-configuration for transaction suport.
* Auto-configuration for transaction support.
*/
package org.springframework.boot.autoconfigure.transaction;

@ -30,7 +30,7 @@ import org.springframework.core.ResolvableType;
* {@link EmbeddedServletContainerCustomizer} to configure websockets for a given
* {@link EmbeddedServletContainerFactory}.
*
* @param <T> the embded servlet container factory
* @param <T> the embedded servlet container factory
* @author Dave Syer
* @author Phillip Webb
* @author Andy Wilkinson

@ -107,14 +107,14 @@ public class PersistenceExceptionTranslationAutoConfigurationTests {
@Repository
private static class TestRepository {
private final EntityManager entityManger;
private final EntityManager entityManager;
TestRepository(EntityManager entityManager) {
this.entityManger = entityManager;
this.entityManager = entityManager;
}
public void doSomething() {
this.entityManger.persist(null);
this.entityManager.persist(null);
}
}

@ -142,7 +142,7 @@ public class ArtemisAutoConfigurationTests {
}
@Test
public void embeddedConnectionFactorEvenIfEmbeddedServiceDisabled() {
public void embeddedConnectionFactoryEvenIfEmbeddedServiceDisabled() {
// No mode is specified
load(EmptyConfiguration.class, "spring.artemis.mode:embedded",
"spring.artemis.embedded.enabled:false");

@ -29,7 +29,7 @@ import static org.junit.Assert.assertThat;
* Tests for {@link ArtemisEmbeddedConfigurationFactory}
*
* @author Eddú Meléndez
* @author Stephane Nicol
* @author Stephane Nicoll
* @author Phillip Webb
*/
public class ArtemisEmbeddedConfigurationFactoryTests {

@ -146,7 +146,7 @@ public class HornetQAutoConfigurationTests {
}
@Test
public void embeddedConnectionFactorEvenIfEmbeddedServiceDisabled() {
public void embeddedConnectionFactoryEvenIfEmbeddedServiceDisabled() {
// No mode is specified
load(EmptyConfiguration.class, "spring.hornetq.mode:embedded",
"spring.hornetq.embedded.enabled:false");

@ -28,7 +28,7 @@ import static org.junit.Assert.assertThat;
/**
* Tests for {@link HornetQEmbeddedConfigurationFactory}.
*
* @author Stephane Nicol
* @author Stephane Nicoll
* @author Phillip Webb
*/
public class HornetQEmbeddedConfigurationFactoryTests {
@ -55,7 +55,7 @@ public class HornetQEmbeddedConfigurationFactoryTests {
}
@Test
public void generatedClusterPassoword() throws Exception {
public void generatedClusterPassword() throws Exception {
HornetQProperties properties = new HornetQProperties();
Configuration configuration = new HornetQEmbeddedConfigurationFactory(properties)
.createConfiguration();
@ -63,7 +63,7 @@ public class HornetQEmbeddedConfigurationFactoryTests {
}
@Test
public void specificClusterPassoword() throws Exception {
public void specificClusterPassword() throws Exception {
HornetQProperties properties = new HornetQProperties();
properties.getEmbedded().setClusterPassword("password");
Configuration configuration = new HornetQEmbeddedConfigurationFactory(properties)

@ -181,9 +181,9 @@ public class MultipartAutoConfigurationTests {
private void testContainerWithCustomMultipartConfigEnabledSetting(
final String propertyValue, int expectedNumberOfMultipartConfigElementBeans) {
this.context = new AnnotationConfigEmbeddedWebApplicationContext();
Map<String, Object> poperties = new LinkedHashMap<String, Object>();
poperties.put("multipart.enabled", propertyValue);
MapPropertySource propertySource = new MapPropertySource("test", poperties);
Map<String, Object> properties = new LinkedHashMap<String, Object>();
properties.put("multipart.enabled", propertyValue);
MapPropertySource propertySource = new MapPropertySource("test", properties);
this.context.getEnvironment().getPropertySources().addFirst(propertySource);
this.context.register(ContainerWithNoMultipartTomcat.class,
BaseConfiguration.class);

@ -28,7 +28,7 @@ import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter;
/**
* Base class for {@link ArtifactsFilter} based on a {@link FilterableDependency} list.
*
* @author Stephane Nicol
* @author Stephane Nicoll
* @author David Turanski
* @since 1.2
*/

Loading…
Cancel
Save