Source:
<code>public CatalogContext( Catalog catalog, DbSettings settings, int version, long genId, CatalogInfo catalogInfo, DefaultProcedureManager defaultProcManager, PlannerTool plannerTool, HostMessenger messenger, boolean hasSchemaChange) { if (catalog == null) { throw new IllegalArgumentException("Can't create CatalogContext with null catalog."); } if (settings == null) { <START> throw new IllegalArgumentException("Cant't create CatalogContent with null cluster settings"); <END> } this.catalog = catalog; cluster = catalog.getClusters().get("cluster"); database = cluster.getDatabases().get("database"); procedures = database.getProcedures(); tables = database.getTables(); authSystem = new AuthSystem(database, cluster.getSecurityenabled()); m_dbSettings = settings; catalogVersion = version; m_genId = genId; m_catalogInfo = catalogInfo; if (hasSchemaChange) { m_defaultProcs = new DefaultProcedureManager(database); m_ptool = new PlannerTool(database, m_catalogInfo.m_catalogHash); } else { m_defaultProcs = defaultProcManager; m_ptool = plannerTool.updateWhenNoSchemaChange(database, m_catalogInfo.m_catalogHash);; } m_jdbc = new JdbcDatabaseMetaDataGenerator(catalog, m_defaultProcs, m_catalogInfo.m_jarfile); m_messenger = messenger; if (procedures != null) { for (Procedure proc : procedures) { if (proc.getSinglepartition()) { ProcedurePartitionInfo ppi = new ProcedurePartitionInfo(VoltType.get((byte)proc.getPartitioncolumn().getType()), proc.getPartitionparameter()); proc.setAttachment(ppi); } } } m_memoizedDeployment = null; }</code><technical_language>"CatalogContent" "CatalogContext". This check combined catalog==null check</technical_language>

Target:
public CatalogContext( Catalog catalog, DbSettings settings, int version, long genId, CatalogInfo catalogInfo, DefaultProcedureManager defaultProcManager, PlannerTool plannerTool, HostMessenger messenger, boolean hasSchemaChange) { if (catalog == null) { throw new IllegalArgumentException("Can't create CatalogContext with null catalog."); } if (settings == null) { throw new IllegalArgumentException("Cant't create CatalogContext with null cluster settings"); } this.catalog = catalog; cluster = catalog.getClusters().get("cluster"); database = cluster.getDatabases().get("database"); procedures = database.getProcedures(); tables = database.getTables(); authSystem = new AuthSystem(database, cluster.getSecurityenabled()); m_dbSettings = settings; catalogVersion = version; m_genId = genId; m_catalogInfo = catalogInfo; if (hasSchemaChange) { m_defaultProcs = new DefaultProcedureManager(database); m_ptool = new PlannerTool(database, m_catalogInfo.m_catalogHash); } else { m_defaultProcs = defaultProcManager; m_ptool = plannerTool.updateWhenNoSchemaChange(database, m_catalogInfo.m_catalogHash);; } m_jdbc = new JdbcDatabaseMetaDataGenerator(catalog, m_defaultProcs, m_catalogInfo.m_jarfile); m_messenger = messenger; if (procedures != null) { for (Procedure proc : procedures) { if (proc.getSinglepartition()) { ProcedurePartitionInfo ppi = new ProcedurePartitionInfo(VoltType.get((byte)proc.getPartitioncolumn().getType()), proc.getPartitionparameter()); proc.setAttachment(ppi); } } } m_memoizedDeployment = null; }