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

Remove default profile during environment merge [SPR-9761] #14395

spring-projects-issues opened this issue Sep 5, 2012 · 1 comment
in: core type: bug


Copy link

@spring-projects-issues spring-projects-issues commented Sep 5, 2012

Chris Beams opened SPR-9761 and commented

Affects: 3.1.2, 3.2 M1


  • #14396 Backport "Remove default profile during environment merge"

Issue Links:

  • #14080 ApplicationContext environment inheritance may causes child context environment property sources to be lost

Referenced from: commits 9f8d219, 84b3f71, fd10e14

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 5, 2012

Chris Beams commented

commit 9f8d219146a789698a60bf5e98df35ddf6374fb2
Author: Chris Beams <>
Commit: Chris Beams <>

    Remove default profile during environment merge
    This change fixes a minor bug with the implementation of
    ConfigurableEnvironment#merge, introduced in SPR-9444. During a merge
    of two environments A and B, where A has default profiles [prod] and B
    has default profiles [default] (the so-called 'reserved default
    profile'), B would complete the merge process having a collection of
    profiles reading [default, prod], which is incorrect.
    This commit explicitly ensure's that B's reserved default profile is
    removed if A has a set of default profiles greater than zero. If A
    consists only of [default], B will inherit it during the merge
    correctly; if A consists of [p1, p2], B will result in [p1, p2] as
    well; if B consists of [p1] and A of [p2, p3], B will result in
    [p1, p2, p3] post-merge.
    Issue: SPR-9761, SPR-9444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core type: bug
None yet

No branches or pull requests

1 participant