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

merge() — spring-boot Function Reference

Architecture documentation for the merge() function in MapBinder.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  2fa630e4_caba_dc86_a5d4_c604ca114a18["merge()"]
  2b6a4a2d_637f_c6f8_a05f_dc3b5effae75["getExistingIfPossible()"]
  2fa630e4_caba_dc86_a5d4_c604ca114a18 -->|calls| 2b6a4a2d_637f_c6f8_a05f_dc3b5effae75
  70e981e6_49fc_4934_abc2_88bf1f1920dd["copyIfPossible()"]
  2fa630e4_caba_dc86_a5d4_c604ca114a18 -->|calls| 70e981e6_49fc_4934_abc2_88bf1f1920dd
  cedd6119_32ef_a246_afec_d50dfb21ef7f["createNewMap()"]
  2fa630e4_caba_dc86_a5d4_c604ca114a18 -->|calls| cedd6119_32ef_a246_afec_d50dfb21ef7f
  style 2fa630e4_caba_dc86_a5d4_c604ca114a18 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/MapBinder.java lines 107–122

	@Override
	protected Map<Object, Object> merge(Supplier<Map<Object, Object>> existing, Map<Object, Object> additional) {
		Map<Object, Object> existingMap = getExistingIfPossible(existing);
		if (existingMap == null) {
			return additional;
		}
		try {
			existingMap.putAll(additional);
			return copyIfPossible(existingMap);
		}
		catch (UnsupportedOperationException ex) {
			Map<Object, Object> result = createNewMap(additional.getClass(), existingMap);
			result.putAll(additional);
			return result;
		}
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does merge() do?
merge() is a function in the spring-boot codebase.
What does merge() call?
merge() calls 3 function(s): copyIfPossible, createNewMap, getExistingIfPossible.

Analyze Your Own Codebase

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

Try Supermodel Free