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

computeDifferences() — spring-boot Function Reference

Architecture documentation for the computeDifferences() function in Changelog.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  05d008fa_14b0_274a_c67a_7e83c4c0a32a["computeDifferences()"]
  1a63a3f4_e818_a018_4115_1c2a9eb7b008["of()"]
  1a63a3f4_e818_a018_4115_1c2a9eb7b008 -->|calls| 05d008fa_14b0_274a_c67a_7e83c4c0a32a
  15f76044_b9ff_0a94_9e6a_3974bb4b5465["getId()"]
  05d008fa_14b0_274a_c67a_7e83c4c0a32a -->|calls| 15f76044_b9ff_0a94_9e6a_3974bb4b5465
  918fd0be_c3d7_f6a4_617c_10585bd3cd62["isDeprecated()"]
  05d008fa_14b0_274a_c67a_7e83c4c0a32a -->|calls| 918fd0be_c3d7_f6a4_617c_10585bd3cd62
  097860b8_471c_9185_deb4_2c446d487af0["getDeprecation()"]
  05d008fa_14b0_274a_c67a_7e83c4c0a32a -->|calls| 097860b8_471c_9185_deb4_2c446d487af0
  style 05d008fa_14b0_274a_c67a_7e83c4c0a32a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

configuration-metadata/spring-boot-configuration-metadata-changelog-generator/src/main/java/org/springframework/boot/configurationmetadata/changelog/Changelog.java lines 45–71

	static List<Difference> computeDifferences(ConfigurationMetadataRepository oldMetadata,
			ConfigurationMetadataRepository newMetadata) {
		List<String> seenIds = new ArrayList<>();
		List<Difference> differences = new ArrayList<>();
		for (ConfigurationMetadataProperty oldProperty : oldMetadata.getAllProperties().values()) {
			String id = oldProperty.getId();
			seenIds.add(id);
			ConfigurationMetadataProperty newProperty = newMetadata.getAllProperties().get(id);
			Difference difference = Difference.compute(oldProperty, newProperty);
			if (difference != null) {
				differences.add(difference);
			}
		}
		for (ConfigurationMetadataProperty newProperty : newMetadata.getAllProperties().values()) {
			if (!seenIds.contains(newProperty.getId())) {
				if (!newProperty.isDeprecated()) {
					differences.add(new Difference(DifferenceType.ADDED, null, newProperty));
				}
				else {
					DifferenceType differenceType = (newProperty.getDeprecation().getLevel() == Level.ERROR)
							? DifferenceType.DELETED : DifferenceType.ADDED;
					differences.add(new Difference(differenceType, null, newProperty));
				}
			}
		}
		return List.copyOf(differences);
	}

Domain

Subdomains

Called By

  • of()

Frequently Asked Questions

What does computeDifferences() do?
computeDifferences() is a function in the spring-boot codebase.
What does computeDifferences() call?
computeDifferences() calls 3 function(s): getDeprecation, getId, isDeprecated.
What calls computeDifferences()?
computeDifferences() is called by 1 function(s): of.

Analyze Your Own Codebase

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

Try Supermodel Free