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

org.richfaces.cdk.templatecompiler.model.NormalizedStringAdapter Maven / Gradle / Ivy

The newest version!
package org.richfaces.cdk.templatecompiler.model;

import javax.xml.bind.annotation.adapters.XmlAdapter;

import org.richfaces.cdk.util.Strings;

public class NormalizedStringAdapter extends XmlAdapter {
    @Override
    public String marshal(String text) {
        return Strings.isEmpty(text) ? null : text.trim();
    }

    @Override
    public String unmarshal(String v) throws Exception {
        return Strings.isEmpty(v) ? null : v.trim();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy