InsertIdentityOperation.hasIdentityColumn has incorrect
code which causes an NPE if you attempt to query the
table name; it should be:
private boolean hasIdentityColumn(ITableMetaData metaData,
IDatabaseConnection connection)
throws DataSetException
{
DatabaseConfig config = connection.getConfig();
IColumnFilter identityFilter = (IColumnFilter)
config.getProperty(
PROPERTY_IDENTITY_COLUMN_FILTER);
if (identityFilter == null)
{
identityFilter = DEFAULT_IDENTITY_FILTER;
}
// Verify if there is at least one identity column
Column[] columns = metaData.getColumns();
for (int i = 0; i < columns.length; i++)
{
if
(identityFilter.accept(metaData.getTableName(),
columns[i]))
{
return true;
}
}
return false;
}
The fix is on the if (identityFilter.accept(... ) line.
Logged In: YES
user_id=140549
Okay, looking at this, the change is from a null being passed in to
metaData.getTableName(), correct? Please review the fix I committed.
In the future, please supply a "patch" file as that can be automatically
applied.
Logged In: YES
user_id=57511
Originator: NO
closed as already patched