Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
PutDatabaseRecord's initialization has the following logic:
final String statementTypeRecordPathValue = context.getProperty(STATEMENT_TYPE_RECORD_PATH).getValue(); if (statementTypeRecordPathValue == null) { recordPathOperationType = null; } else { final RecordPath recordPath = RecordPath.compile(statementTypeRecordPathValue); recordPathOperationType = new RecordPathStatementType(recordPath); }
This assumes that the RecordPath is valid or is not set. But that's necessarily the case. Because the STATEMENT_TYPE_RECORD_PATH property depends on the "Statement Type" property being set to "RecordPath", it is possible to set the Statement Type to RecordPath, set an invalid RecordPath, and then change the Statement Type to something else, such as INSERT.
Now, the Processor fails to start, with a cryptic error message.
The Processor needs to be updated to ensure that it does not attempt to compile the RecordPath unless the "Statement Type" property is set to "RecordPath".