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

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

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

import java.util.UUID;

/**
 * Deserializes UUIDs.
 */
public class UUIDDeserializer implements Deserializer {
    @Override
    public UUID deserialize(String value) throws DeserializerException {
        try {
            return value == null || value.equals("") ? null : UUID.fromString(value);
        } catch (Exception e) {
            throw new DeserializerException("invalid.uuid");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy