Skip to content

Commit

Permalink
fix: Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
larshelge committed Oct 18, 2024
1 parent 340913b commit 84618bb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down

0 comments on commit 84618bb

Please sign in to comment.