Skip to content

WebServicesAutoConfiguration @ConditionalOnProperty does not match against lists #14241

Closed
@snicoll

Description

@snicoll

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

If you have contributed before, consider leaving this one for someone new, and looking through our general ideal-for-contribution issues. Thanks!

Problem

The WebServicesAutoConfiguration class has a conditional on property but @ConditionalOnProperty does not work with lists. There is a test that exercises the behavior but it only works because the full list is specified in a single property. If it was provided as individual item, such as spring.webservices.wsdl-locations[0] (as one would do with YAML) the condition wouldn't match.

See #9635

Solution

We would need a custom condition similar to this so that can be used instead of @ConditionalOnProperty here. A new test case with one element of the list provided would need to be added to this class.

An abstract class can be created to extract the common code between OnBootstrapHostsCondition and the new condition. Additionally, similar to OnBootstrapHostsConditionTests, we would also need tests for the new condition.

Steps to Fix

  • Claim this issue with a comment here, below, and ask any clarifying questions you need
  • Set up a repository locally following the Contributing Guidelines
  • Try to fix the issue following the steps above
  • Commit your changes and start a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: first-timers-onlyAn issue that can only be worked on by brand new contributorsstatus: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions