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

checkAllowedKeys() — spring-boot Function Reference

Architecture documentation for the checkAllowedKeys() function in JsonMarshaller.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 1 called by 7

Entity Profile

Dependency Diagram

graph TD
  4c649efe_9b8c_671f_8543_8e5ce14da8b6["checkAllowedKeys()"]
  30292bfa_e8ed_1caa_f042_78733422492f["read()"]
  30292bfa_e8ed_1caa_f042_78733422492f -->|calls| 4c649efe_9b8c_671f_8543_8e5ce14da8b6
  243c6917_5588_f779_9f81_3b5d46c64fe2["addIgnoredProperties()"]
  243c6917_5588_f779_9f81_3b5d46c64fe2 -->|calls| 4c649efe_9b8c_671f_8543_8e5ce14da8b6
  a4ddef17_9e29_3655_ab30_36b478cdc572["toItemMetadata()"]
  a4ddef17_9e29_3655_ab30_36b478cdc572 -->|calls| 4c649efe_9b8c_671f_8543_8e5ce14da8b6
  7340dea3_0533_f065_3340_e4e5990881cc["toItemDeprecation()"]
  7340dea3_0533_f065_3340_e4e5990881cc -->|calls| 4c649efe_9b8c_671f_8543_8e5ce14da8b6
  df10d13e_2f95_92e4_f0a3_a432b7541a24["toItemHint()"]
  df10d13e_2f95_92e4_f0a3_a432b7541a24 -->|calls| 4c649efe_9b8c_671f_8543_8e5ce14da8b6
  5e52a6ea_f8c9_68fe_725b_7743d896981d["toValueHint()"]
  5e52a6ea_f8c9_68fe_725b_7743d896981d -->|calls| 4c649efe_9b8c_671f_8543_8e5ce14da8b6
  de92dd4c_f87e_697f_8cb9_03f586a8b7af["toValueProvider()"]
  de92dd4c_f87e_697f_8cb9_03f586a8b7af -->|calls| 4c649efe_9b8c_671f_8543_8e5ce14da8b6
  a7cdfaaf_6c5a_872d_8d32_7ea60c1f0271["keys()"]
  4c649efe_9b8c_671f_8543_8e5ce14da8b6 -->|calls| a7cdfaaf_6c5a_872d_8d32_7ea60c1f0271
  style 4c649efe_9b8c_671f_8543_8e5ce14da8b6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

configuration-metadata/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/JsonMarshaller.java lines 204–213

	@SuppressWarnings("unchecked")
	private void checkAllowedKeys(JSONObject object, JsonPath path, String... allowedKeys) {
		Set<String> availableKeys = new TreeSet<>();
		object.keys().forEachRemaining((key) -> availableKeys.add((String) key));
		Arrays.stream(allowedKeys).forEach(availableKeys::remove);
		if (!availableKeys.isEmpty()) {
			throw new IllegalStateException("Expected only keys %s, but found additional keys %s. Path: %s"
				.formatted(new TreeSet<>(Arrays.asList(allowedKeys)), availableKeys, path));
		}
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does checkAllowedKeys() do?
checkAllowedKeys() is a function in the spring-boot codebase.
What does checkAllowedKeys() call?
checkAllowedKeys() calls 1 function(s): keys.
What calls checkAllowedKeys()?
checkAllowedKeys() is called by 7 function(s): addIgnoredProperties, read, toItemDeprecation, toItemHint, toItemMetadata, toValueHint, toValueProvider.

Analyze Your Own Codebase

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

Try Supermodel Free