com.azure.spring.cloud.appconfiguration.config.implementation.NormalizeNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-cloud-azure-appconfiguration-config Show documentation
Show all versions of spring-cloud-azure-appconfiguration-config Show documentation
Integration of Spring Cloud Config and Azure App Configuration Service
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.spring.cloud.appconfiguration.config.implementation;
import com.azure.data.appconfiguration.models.ConfigurationSetting;
/**
* Used for Normalizing the Label value. A null label needs to be \0 while searching with null returns all
* configurations with any label.
*
*/
public class NormalizeNull {
private static final String EMPTY_LABEL = "\0";
/**
* Normalizes the null value to \0.
*
* @param setting ConfigurationSetting
* @return ConfigurationSetting with label corrected from null to \0
*/
public static ConfigurationSetting normalizeNullLabel(ConfigurationSetting setting) {
return setting.getLabel() == null ? setting.setLabel(EMPTY_LABEL) : setting;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy