Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in FlywayEndpoint with schema baseline #14019

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -17,9 +17,11 @@
package org.springframework.boot.actuate.flyway;

import java.time.Instant;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand All @@ -38,6 +40,7 @@
* @author Eddú Meléndez
* @author Phillip Webb
* @author Andy Wilkinson
* @author Artsiom Yudovin
* @since 2.0.0
*/
@Endpoint(id = "flyway")
Expand Down Expand Up @@ -164,9 +167,10 @@ private FlywayMigration(MigrationInfo info) {
this.script = info.getScript();
this.state = info.getState();
this.installedBy = info.getInstalledBy();
this.installedOn = Instant.ofEpochMilli(info.getInstalledOn().getTime());
this.installedRank = info.getInstalledRank();
this.executionTime = info.getExecutionTime();
this.installedOn = Optional.ofNullable(info.getInstalledOn())
.map(Date::getTime).map(Instant::ofEpochMilli).orElse(null);
}

private String nullSafeToString(Object obj) {
Expand Down