Skip to content

Commit

Permalink
fix null pointer due to blank trigger name
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Mar 27, 2013
1 parent 068d883 commit b0afc94
Showing 1 changed file with 9 additions and 4 deletions.
Expand Up @@ -179,10 +179,15 @@ public void dropTablesAndDatabaseObjects() {

final public boolean doesTriggerExist(String catalogName, String schema, String tableName,
String triggerName) {
try {
return doesTriggerExistOnPlatform(catalogName, schema, tableName, triggerName);
} catch (Exception ex) {
log.warn("Could not figure out if the trigger exists. Assuming that is does not", ex);
if (StringUtils.isNotBlank(triggerName)) {
try {
return doesTriggerExistOnPlatform(catalogName, schema, tableName, triggerName);
} catch (Exception ex) {
log.warn("Could not figure out if the trigger exists. Assuming that is does not",
ex);
return false;
}
} else {
return false;
}
}
Expand Down

0 comments on commit b0afc94

Please sign in to comment.