CCM NG/ccm-core: MimeTypeConverter now works with null values for the MimeType in the database

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4884 8810af33-2d31-482b-a856-94f89814c4df
ccm-docs
jensp 2017-07-25 14:54:57 +00:00
parent 1b7b03a481
commit dfb2766a85
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ public class MimeTypeConverter implements AttributeConverter<MimeType, String> {
@Override
public MimeType convertToEntityAttribute(final String dbData) {
if (dbData == null) {
return null;
}
try {
return new MimeType(dbData);
} catch (MimeTypeParseException ex) {