Commit 9ffc257
authored
NIFI-15709 Close OutputStream when schema retrieval fails in RecordWriter (apache#10997)
When writerFactory.getSchema() throws an exception, the OutputStream
opened by session.write(flowFile) was not being closed before the
continue statement. This left the FlowFile in an invalid state,
causing IllegalStateException when session.remove() was later called.
This fix ensures the OutputStream is properly closed in the error
handling path before continuing to the next message.1 parent 4358374 commit 9ffc257
File tree
1 file changed
+5
-0
lines changed- nifi-extension-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/ioconcept/writer/record
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
139 | 144 | | |
140 | 145 | | |
141 | 146 | | |
| |||
0 commit comments