All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.runtime.configuration.TrimmedStringConverter Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package io.quarkus.runtime.configuration;

import org.eclipse.microprofile.config.spi.Converter;

public class TrimmedStringConverter implements Converter {

    public TrimmedStringConverter() {
    }

    @Override
    public String convert(String s) {
        if (s == null) {
            return null;
        }

        String trimmedString = s.trim();

        if (trimmedString.isEmpty()) {
            return null;
        }

        return trimmedString;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy