AI REVIEWED
Module: spring-boot-starter
File: spring/autoconfigure/DataFixerRegistry.java (~line 154-160)
Severity: Medium
Summary
register() uses containsKey() followed by put() on a ConcurrentHashMap. Between these two calls, another thread could register the same domain.
if (this.fixers.containsKey(domain)) {
throw new IllegalArgumentException("already registered");
}
this.fixers.put(domain, fixer); // race window
Suggested Fix
AetherDataFixer existing = this.fixers.putIfAbsent(domain, fixer);
if (existing != null) {
throw new IllegalArgumentException("DataFixer already registered for domain: " + domain);
}