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-94f89814c4dfpull/2/head
parent
1d69f0a0ab
commit
d6cffc1b91
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue