Class RegistrationVersionSanitizer
java.lang.Object
ai.pipestream.registration.handlers.RegistrationVersionSanitizer
Defensive sanitizer for registration version strings coming from modules/services.
Prevents unresolved template placeholders from reaching persistence/indexing/registry calls.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringsanitize(String rawVersion, String registrationName, org.jboss.logging.Logger log, String sourceField) Sanitizes a registration version string, falling back toFALLBACK_VERSIONfor null, blank, or placeholder-like values, and logging a warning when the value had to be replaced.
-
Method Details
-
sanitize
public static String sanitize(String rawVersion, String registrationName, org.jboss.logging.Logger log, String sourceField) Sanitizes a registration version string, falling back toFALLBACK_VERSIONfor null, blank, or placeholder-like values, and logging a warning when the value had to be replaced.- Parameters:
rawVersion- the version string as receivedregistrationName- the name of the registering module/service (for the log message)log- the logger to warn through, ornullto suppress loggingsourceField- the name of the field the version came from (for the log message)- Returns:
- the original trimmed version, or
FALLBACK_VERSIONwhen it was unusable
-