package org.flywaydb.core.internal.resolver;
import org.flywaydb.core.api.resolver.ResolvedMigration;
import java.util.Comparator;
<BUG>import static org.flywaydb.core.internal.util.ComparableUtils.compareNullsLast;</BUG>
public class ResolvedMigrationComparator implements Comparator<ResolvedMigration> {
@Override
public int compare(ResolvedMigration o1, ResolvedMigration o2) {
<BUG>int result = compareNullsLast(o1.getVersion(), o2.getVersion());
if (result != 0) {
return result;
}</BUG>
return o1.getDescription().compareTo(o2.getDescription());

package org.flywaydb.core.internal.resolver;
import org.flywaydb.core.api.resolver.ResolvedMigration;
import java.util.Comparator;
public class ResolvedMigrationComparator implements Comparator<ResolvedMigration> {
@Override
public int compare(ResolvedMigration o1, ResolvedMigration o2) {
if ((o1.getVersion() != null) && o2.getVersion() != null) {
return o1.getVersion().compareTo(o2.getVersion());
