Skip to content

Commit 03988b5

Browse files
davidfrigoletdieppa
authored andcommitted
add strict validation for stage–change mappings (enabled by default) (#742)
1 parent bacb344 commit 03988b5

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

cloud/flamingock-cloud/src/test/java/io/flamingock/cloud/audit/HttpAuditWriterMapperTest.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
*/
1616
package io.flamingock.cloud.audit;
1717

18-
import io.flamingock.api.RecoveryStrategy;
19-
import io.flamingock.api.annotations.Change;
20-
import io.flamingock.api.annotations.Apply;
21-
import io.flamingock.api.annotations.Recovery;
18+
import io.flamingock.api.annotations.*;
2219
import io.flamingock.core.kit.audit.AuditEntryTestFactory;
2320
import io.flamingock.internal.common.cloud.audit.AuditEntryRequest;
2421
import io.flamingock.internal.common.core.audit.AuditEntry;
@@ -30,16 +27,11 @@
3027
class HttpAuditWriterMapperTest {
3128

3229
// Test classes for different recovery strategies
33-
@Change(id = "test-manual", author = "aperezdieppa")
34-
@Recovery(strategy = RecoveryStrategy.MANUAL_INTERVENTION)
3530
static class _001__TestManualInterventionChange {
36-
@Apply
3731
public void apply() {}
3832
}
3933

40-
@Change(id = "test-default", author = "aperezdieppa")
4134
static class _001__TestDefaultRecoveryChange {
42-
@Apply
4335
public void apply() {}
4436
}
4537

core/flamingock-core-api/src/main/java/io/flamingock/api/annotations/EnableFlamingock.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@
213213
/**
214214
* If true, the annotation processor will validate that all code-based changes
215215
* (classes annotated with @Change) are mapped to some stage. When unmapped changes
216-
* are found and this flag is true, a RuntimeException is thrown. Default is false
217-
* (only a warning is emitted).
216+
* are found and this flag is true**(default)**, a RuntimeException is thrown at compilation time.
217+
* When false, only a warning is emitted.
218218
*/
219-
boolean strictStageMapping() default false;
219+
boolean strictStageMapping() default true;
220220
}

0 commit comments

Comments
 (0)