Skip to content

ContextConfigurationAttributes(Class) constructor incorrectly sets inheritLocations to false #36000

@sbrannen

Description

@sbrannen

Overview

The ContextConfigurationAttributes(Class) constructor introduced in Spring Framework 4.3 (#18528) incorrectly sets the inheritLocations flag to false which is not the default in @ContextConfiguration.

This has likely gone unnoticed for so many years, since this constructor is only invoked in a single place within the TestContext framework, and even then only with a single instance of ContextConfigurationAttributes in a given List.

In other words, with only a single ContextConfigurationAttributes instance, the inheritLocations flag didn't even matter.

However, due to #31456, we now store multiple such ContextConfigurationAttributes instances in a List, which means that the inheritLocations flag matters now.

Related Issues

Metadata

Metadata

Assignees

Labels

in: testIssues in the test moduletype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions