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

Former-commit-id: 577413c864
pull/2/head
jensp 2017-07-25 14:54:57 +00:00
parent f9d21c9846
commit 64ffb29b7b
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) {