From c4c391c5afe78156f2c5a567dac2e99dfcaac6ea Mon Sep 17 00:00:00 2001 From: filipe Date: Fri, 31 Mar 2023 13:53:32 -0300 Subject: [PATCH] Fix nullpointers ignoring types having null size. --- .../ext/hibernate/diff/ChangedColumnChangeGenerator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/liquibase/ext/hibernate/diff/ChangedColumnChangeGenerator.java b/src/main/java/liquibase/ext/hibernate/diff/ChangedColumnChangeGenerator.java index 38960e0e..dffc5f3c 100644 --- a/src/main/java/liquibase/ext/hibernate/diff/ChangedColumnChangeGenerator.java +++ b/src/main/java/liquibase/ext/hibernate/diff/ChangedColumnChangeGenerator.java @@ -51,8 +51,7 @@ private void handleSizeChange(Column column, ObjectDifferences differences, Diff } Integer originalSize = ((DataType) d.getReferenceValue()).getColumnSize(); Integer newSize = ((DataType) d.getComparedValue()).getColumnSize(); - if ((newSize == null && originalSize == null) || - (newSize != null && newSize.equals(originalSize))) { + if (newSize == null || originalSize == null || newSize.equals(originalSize)) { differences.removeDifference(d.getField()); } }