Skip to content

Commit 9f728b3

Browse files
committed
Fix wrong import
1 parent a61b29e commit 9f728b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import javax.persistence.EntityManagerFactory;
2525
import javax.sql.DataSource;
2626

27-
import org.apache.commons.lang.ObjectUtils;
2827
import org.flywaydb.core.Flyway;
2928
import org.flywaydb.core.api.MigrationVersion;
3029

@@ -50,13 +49,15 @@
5049
import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean;
5150
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
5251
import org.springframework.util.Assert;
52+
import org.springframework.util.ObjectUtils;
5353

5454
/**
5555
* {@link EnableAutoConfiguration Auto-configuration} for Flyway database migrations.
5656
*
5757
* @author Dave Syer
5858
* @author Phillip Webb
5959
* @author Vedran Pavic
60+
* @author Stephane Nicoll
6061
* @since 1.1.0
6162
*/
6263
@Configuration
@@ -189,7 +190,7 @@ public Set<ConvertiblePair> getConvertibleTypes() {
189190

190191
@Override
191192
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
192-
String value = ObjectUtils.toString(source);
193+
String value = ObjectUtils.nullSafeToString(source);
193194
return MigrationVersion.fromVersion(value);
194195
}
195196

0 commit comments

Comments
 (0)