diff --git a/dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/jsonb/type/JsonAttributeValueBinaryType.java b/dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/jsonb/type/JsonAttributeValueBinaryType.java index 25031fbe0043..2df4fdc0eceb 100644 --- a/dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/jsonb/type/JsonAttributeValueBinaryType.java +++ b/dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/jsonb/type/JsonAttributeValueBinaryType.java @@ -30,6 +30,7 @@ import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; +import java.io.UncheckedIOException; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -69,7 +70,7 @@ public String convertObjectToJson(Object object) { return writer.writeValueAsString(attrValueMap); } catch (IOException ex) { - throw new RuntimeException("Failed to serialize JSON", ex); + throw new UncheckedIOException("Failed to serialize JSON", ex); } } @@ -86,7 +87,7 @@ public Object convertJsonToObject(String content) { return convertAttributeValueMapIntoSet(data); } catch (IOException ex) { - throw new RuntimeException("Failed to deserialize JSON", ex); + throw new UncheckedIOException("Failed to deserialize JSON", ex); } }