Skip to content

Commit 266673f

Browse files
committed
fix compatibility with new version of Flyway library
1 parent 6244ddd commit 266673f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

embedded-database-spring-test-core/src/main/java/io/zonky/test/db/flyway/FlywayDataSourceContext.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ protected static class FlywayConfigSnapshot implements FlywayConfiguration {
135135
// not included in equals and hashCode methods
136136
private final ClassLoader classLoader;
137137
private final DataSource dataSource;
138+
private final FlywayCallback[] callbacks; // the callbacks are modified during the migration
138139

139140
// included in equals and hashCode methods
140141
// but it will work only for empty arrays (that is common use-case)
141142
// because of missing equals and hashCode methods
142143
// on classes implementing these interfaces,
143144
// note the properties require special treatment suitable for arrays
144145
private final MigrationResolver[] resolvers;
145-
private final FlywayCallback[] callbacks;
146146

147147
// included in equals and hashCode methods
148148
// but these properties require special treatment suitable for arrays
@@ -391,7 +391,6 @@ public boolean equals(Object o) {
391391
mixed == that.mixed &&
392392
group == that.group &&
393393
Arrays.equals(resolvers, that.resolvers) &&
394-
Arrays.equals(callbacks, that.callbacks) &&
395394
Arrays.equals(locations, that.locations) &&
396395
Arrays.equals(schemas, that.schemas) &&
397396
Objects.equals(baselineVersion, that.baselineVersion) &&
@@ -412,8 +411,7 @@ public boolean equals(Object o) {
412411
@Override
413412
public int hashCode() {
414413
return Objects.hash(
415-
Arrays.hashCode(resolvers), Arrays.hashCode(callbacks),
416-
Arrays.hashCode(locations), Arrays.hashCode(schemas),
414+
Arrays.hashCode(resolvers), Arrays.hashCode(locations), Arrays.hashCode(schemas),
417415
baselineVersion, target, placeholders, table, baselineDescription,
418416
repeatableSqlMigrationPrefix, sqlMigrationSeparator, sqlMigrationPrefix,
419417
sqlMigrationSuffix, placeholderPrefix, placeholderSuffix, encoding,

0 commit comments

Comments
 (0)