[
https://issues.apache.org/jira/browse/NIFI-15666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18062661#comment-18062661
]
ASF subversion and git services commented on NIFI-15666:
--------------------------------------------------------
Commit 99436b998754c3ec30c24f2181443ae6f214677a in nifi's branch
refs/heads/main from machov
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=99436b99875 ]
NIFI-15666: Complete NaiveSearchRingBuffer usage example in Javadoc
Improves the Javadoc example for NaiveSearchRingBuffer by replacing
incomplete TODO placeholder with a complete, working code example.
Changes Made:
- Removed TODO comment and provided concrete byte sequence assignment
- Fixed incorrect class name in example (CircularBuffer ->
NaiveSearchRingBuffer)
- Added proper type casting for addAndCompare() method call
- Provided realistic example using newline delimiter search pattern
- Added explanatory comment to clarify the search purpose
This change improves developer experience by providing a complete,
copy-paste ready example instead of leaving developers to figure out
the missing implementation details.
Fixes NIFI-15666
This closes #10961.
Signed-off-by: Pierre Villard <[email protected]>
> Complete NaiveSearchRingBuffer usage example in Javadoc
> -------------------------------------------------------
>
> Key: NIFI-15666
> URL: https://issues.apache.org/jira/browse/NIFI-15666
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Documentation & Website
> Reporter: Nikita Awasthi
> Priority: Trivial
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The NaiveSearchRingBuffer class contains an incomplete Javadoc example with a
> TODO placeholder instead of providing a working code example. This makes it
> difficult for developers to understand proper usage.
> Current Javadoc example:
> ```java
> final byte[] searchSequence; //TODO assignment
> final CircularBuffer buffer = new CircularBuffer(searchSequence);
> ```
> Issues with current example:
> 1. Contains TODO instead of actual implementation
> 2. Uses incorrect class name (CircularBuffer vs NaiveSearchRingBuffer)
> 3. Missing proper constructor call example
> 4. No context about realistic use cases
> Proposed improvement: Replace with complete, working example showing newline
> delimiter search (common use case).
> This change will improve developer experience by providing copy-paste ready
> example code.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)