This is an automated email from the ASF dual-hosted git repository. mariofusco pushed a commit to branch q3lts in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
commit 324adba0546bf21554270de9432927619f90d3c4 Author: Pere Fernández <[email protected]> AuthorDate: Thu Dec 7 16:06:48 2023 +0100 - Fix Oracle IT Tests (#1931) --- .../org/kie/kogito/persistence/oracle/hibernate/JsonBinaryType.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/persistence-commons/persistence-commons-oracle/src/main/java/org/kie/kogito/persistence/oracle/hibernate/JsonBinaryType.java b/persistence-commons/persistence-commons-oracle/src/main/java/org/kie/kogito/persistence/oracle/hibernate/JsonBinaryType.java index 667e799f6..1c945b5dd 100644 --- a/persistence-commons/persistence-commons-oracle/src/main/java/org/kie/kogito/persistence/oracle/hibernate/JsonBinaryType.java +++ b/persistence-commons/persistence-commons-oracle/src/main/java/org/kie/kogito/persistence/oracle/hibernate/JsonBinaryType.java @@ -64,12 +64,12 @@ public class JsonBinaryType implements UserType<JsonNode> { @Override public JsonNode nullSafeGet(ResultSet rs, int position, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - final Blob json = rs.getBlob(position); - if (json.length() == 0) { + final Blob blob = rs.getBlob(position); + if (blob == null || blob.length() == 0) { return null; } try { - return mapper.readTree(json.getBinaryStream()); + return mapper.readTree(blob.getBinaryStream()); } catch (final Exception ex) { throw new RuntimeException("Failed to convert String to JSON: " + ex.getMessage(), ex); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
