wrapConfig

Wraps an arbitrary YAML file for use in AbstractConfig.

Uses snakeyaml-engine (YAML 1.2) internally. This means only true/false are booleans — yes/no/on/off are treated as strings. Comments are fully supported: they are preserved during round-trips and can be set programmatically.

Type coercion is applied when reading values: lossless conversions (e.g. Int to Long, any scalar to String) succeed silently. Lossy or impossible conversions log a warning and return the registered default.

This implementation is not thread-safe. Callers must ensure that reads, writes, reloads, and saves are not performed concurrently from multiple threads.


Wraps an arbitrary YAML file for use in AbstractConfig.

Parameters

configPath

Path to the YAML configuration file

logger

Logger used for type coercion warnings

See also