Skip to content

Fix #4186: Change failOnMissingLocations from primitive boolean to Bo…#4196

Open
eunseo9311 wants to merge 1 commit into
flyway:mainfrom
eunseo9311:feature/contribution
Open

Fix #4186: Change failOnMissingLocations from primitive boolean to Bo…#4196
eunseo9311 wants to merge 1 commit into
flyway:mainfrom
eunseo9311:feature/contribution

Conversation

@eunseo9311
Copy link
Copy Markdown

Title:

Fix #4186: Change failOnMissingLocations from primitive boolean to Boolean wrapper in Gradle plugin
Body:

Summary

  • Fix failOnMissingLocations configuration being ignored in Gradle plugin
  • Changed field type from primitive boolean to Boolean wrapper class

Problem

The failOnMissingLocations field in AbstractFlywayTask was declared as primitive boolean, which:

  1. Always defaults to false and can never be null
  2. Causes putIfSet() to always use the default value instead of user-configured value
  3. Makes Gradle configuration like failOnMissingLocations = true ineffective

Solution

Changed public boolean failOnMissingLocations to public Boolean failOnMissingLocations to match the pattern used by all other 19 boolean configuration fields in this class.

Related Issues

Test plan

  • Build compiles successfully (mvn compile)
  • Manual test: Set failOnMissingLocations = true in Gradle and verify it takes effect

… to Boolean wrapper

The failOnMissingLocations field in AbstractFlywayTask was declared as a
primitive boolean, which always defaults to false and can never be null.
This caused putIfSet() to always use the default value instead of the
user-configured value from FlywayExtension.

Changed the field type from 'boolean' to 'Boolean' to match the pattern
used by all other boolean configuration fields in this class (19 fields
use Boolean wrapper, only this one was primitive).

This is the same bug pattern as flyway#3940 (connectRetries/connectRetriesInterval).
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 23, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gradle plugin failOnMissingLocations broken config

2 participants