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
parent
64e9b6097b
commit
577413c864
|
|
@ -43,6 +43,9 @@ public class MimeTypeConverter implements AttributeConverter<MimeType, String> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MimeType convertToEntityAttribute(final String dbData) {
|
public MimeType convertToEntityAttribute(final String dbData) {
|
||||||
|
if (dbData == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
return new MimeType(dbData);
|
return new MimeType(dbData);
|
||||||
} catch (MimeTypeParseException ex) {
|
} catch (MimeTypeParseException ex) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue