de.retest.persistence.StringInternerAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of retest-model Show documentation
Show all versions of retest-model Show documentation
The domain model for both retest and recheck.
package de.retest.persistence;
import javax.xml.bind.DatatypeConverter;
import javax.xml.bind.annotation.adapters.XmlAdapter;
// Using code from https://jaxb.java.net/tutorial/section_5_5-Interning-Strings.html
public class StringInternerAdapter extends XmlAdapter {
@Override
public String marshal( final String value ) throws Exception {
return value;
}
@Override
public String unmarshal( final String value ) throws Exception {
return DatatypeConverter.parseString( value ).intern();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy