From 9a8d6955b05109564298a262efb79f73ac8b9946 Mon Sep 17 00:00:00 2001 From: brmeyer Date: Tue, 30 Oct 2012 12:17:50 -0400 Subject: [PATCH] HHH-7728 added null checks --- hibernate-core/src/main/java/org/hibernate/mapping/Table.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Table.java b/hibernate-core/src/main/java/org/hibernate/mapping/Table.java index f8a63a0bba..3b34475107 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Table.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Table.java @@ -354,8 +354,8 @@ public class Table implements RelationalModel, Serializable { } return isQuoted() ? name.equals(table.getName()) : name.equalsIgnoreCase(table.getName()) - && isSchemaQuoted() ? schema.equals(table.getSchema()) : schema.equalsIgnoreCase(table.getSchema()) - && isCatalogQuoted() ? catalog.equals(table.getCatalog()) : catalog.equalsIgnoreCase(table.getCatalog()); + && ((schema == null && table.getSchema() != null) ? false : (schema == null) ? true : isSchemaQuoted() ? schema.equals(table.getSchema()) : schema.equalsIgnoreCase(table.getSchema())) + && ((catalog == null && table.getCatalog() != null) ? false : (catalog == null) ? true : isCatalogQuoted() ? catalog.equals(table.getCatalog()) : catalog.equalsIgnoreCase(table.getCatalog())); } public void validateColumns(Dialect dialect, Mapping mapping, TableMetadata tableInfo) {