Home / Function/ analysisWithKnownPropertyAndOtherCandidates() — spring-boot Function Reference

analysisWithKnownPropertyAndOtherCandidates() — spring-boot Function Reference

Architecture documentation for the analysisWithKnownPropertyAndOtherCandidates() function in InvalidConfigurationPropertyValueFailureAnalyzerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66["analysisWithKnownPropertyAndOtherCandidates()"]
  660de5d2_3b68_dc8d_57eb_76ad92696657["attach()"]
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66 -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  76a8f351_0101_5e91_376b_b1b7132cfbc6["InvalidConfigurationPropertyValueException()"]
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66 -->|calls| 76a8f351_0101_5e91_376b_b1b7132cfbc6
  8de78192_a78d_83e4_9384_66ded02fff62["performAnalysis()"]
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66 -->|calls| 8de78192_a78d_83e4_9384_66ded02fff62
  e95240b7_eaac_7e35_9b33_3b328bfdd0bb["assertCommonParts()"]
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66 -->|calls| e95240b7_eaac_7e35_9b33_3b328bfdd0bb
  1a4e5320_a2e2_8aa5_7d05_1e805db190f1["getAction()"]
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66 -->|calls| 1a4e5320_a2e2_8aa5_7d05_1e805db190f1
  ebc7cdd4_21bc_3491_686c_090da262ca48["getDescription()"]
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66 -->|calls| ebc7cdd4_21bc_3491_686c_090da262ca48
  style ddb4ccc2_4e15_199b_e57f_94e38e24cb66 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzerTests.java lines 106–128

	@Test
	void analysisWithKnownPropertyAndOtherCandidates() {
		MapPropertySource source = new MapPropertySource("test", Collections.singletonMap("test.property", "invalid"));
		MapPropertySource additional = new MapPropertySource("additional",
				Collections.singletonMap("test.property", "valid"));
		MapPropertySource another = new MapPropertySource("another", Collections.singletonMap("test.property", "test"));
		this.environment.getPropertySources().addFirst(OriginCapablePropertySource.get(source));
		this.environment.getPropertySources().addLast(additional);
		this.environment.getPropertySources().addLast(OriginCapablePropertySource.get(another));
		this.environment.getPropertySources().addLast(OriginCapablePropertySource.get("another-again", another));
		ConfigurationPropertySources.attach(this.environment);
		InvalidConfigurationPropertyValueException failure = new InvalidConfigurationPropertyValueException(
				"test.property", "invalid", "This is not valid.");
		FailureAnalysis analysis = performAnalysis(failure);
		assertThat(analysis).isNotNull();
		assertCommonParts(failure, analysis);
		assertThat(analysis.getAction()).contains("Review the value of the property with the provided reason.");
		assertThat(analysis.getDescription())
			.contains("Additionally, this property is also set in the following property sources:")
			.contains("In 'additional' with the value 'valid'")
			.contains("In 'another' with the value 'test' (originating from 'TestOrigin test.property')")
			.doesNotContain("another-again");
	}

Domain

Subdomains

Frequently Asked Questions

What does analysisWithKnownPropertyAndOtherCandidates() do?
analysisWithKnownPropertyAndOtherCandidates() is a function in the spring-boot codebase.
What does analysisWithKnownPropertyAndOtherCandidates() call?
analysisWithKnownPropertyAndOtherCandidates() calls 6 function(s): InvalidConfigurationPropertyValueException, assertCommonParts, attach, getAction, getDescription, performAnalysis.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free