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

se.fortnox.reactivewizard.jaxrs.params.deserializing.BooleanNotNullDeserializer Maven / Gradle / Ivy

There is a newer version: 24.6.0
Show newest version
package se.fortnox.reactivewizard.jaxrs.params.deserializing;

/**
 * Deserializes booleans, not allowing nulls.
 */
public class BooleanNotNullDeserializer implements Deserializer {
    @Override
    public Boolean deserialize(String value) throws DeserializerException {
        if (value == null) {
            throw new DeserializerException("invalid.boolean");
        }
        return Boolean.valueOf(value.trim());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy