fix: address SonarQube reliability issues
- ElkDiagramRenderer.getElkRoot(): add null guard to prevent NPE when node is null (SQ java:S2259) - WriteBuffer: add offerOrWarn() that logs when buffer is full instead of silently dropping data. ChunkAccumulator now uses this method so ingestion backpressure is visible in logs (SQ java:S899) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -110,8 +110,8 @@ public class StorageBeanConfig {
|
||||
WriteBuffer<ChunkAccumulator.ProcessorBatch> processorBatchBuffer,
|
||||
DiagramStore diagramStore) {
|
||||
return new ChunkAccumulator(
|
||||
executionBuffer::offer,
|
||||
processorBatchBuffer::offer,
|
||||
executionBuffer::offerOrWarn,
|
||||
processorBatchBuffer::offerOrWarn,
|
||||
diagramStore,
|
||||
java.time.Duration.ofMinutes(5));
|
||||
}
|
||||
|
||||
@@ -884,6 +884,7 @@ public class ElkDiagramRenderer implements DiagramRenderer {
|
||||
}
|
||||
|
||||
private ElkNode getElkRoot(ElkNode node) {
|
||||
if (node == null) return null;
|
||||
ElkNode current = node;
|
||||
while (current.getParent() != null) {
|
||||
current = current.getParent();
|
||||
|
||||
Reference in New Issue
Block a user