doGetDefaultProfiles method

  1. @protected
Set<String> doGetDefaultProfiles()

Resolves Default Profiles

Computes the effective set of default profiles, reading from the DEFAULT_PROFILES_PROPERTY_NAME if applicable.

Behavior

  • If _defaultProfiles contains only the reserved "default", attempts to resolve configured defaults from properties.
  • Parses and applies the property value as a comma-delimited list.
  • Updates the internal _defaultProfiles set.

Returns

A synchronized Set of default profile names.

Example

final defaults = doGetDefaultProfiles();
print(defaults); // e.g., ["default"]

Notes

  • Thread-safe: access is synchronized on _defaultProfiles.
  • Ensures fallback profiles exist when no actives are configured.

Implementation

@protected
Set<String> doGetDefaultProfiles() {
  return synchronized(_defaultProfiles, () {
    if (_defaultProfiles.equals(getReservedDefaultProfiles())) {
      String? profiles = doGetDefaultProfilesProperty();
      if (profiles?.isNotEmpty ?? false) {
        setDefaultProfiles(StringUtils.commaDelimitedListToStringList(StringUtils.trimAllWhitespace(profiles!)));
      }
    }
    return _defaultProfiles;
  });
}