[ 
https://issues.apache.org/jira/browse/NIFI-13850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888024#comment-17888024
 ] 

ASF subversion and git services commented on NIFI-13850:
--------------------------------------------------------

Commit f41f6fea4f217c70719a9c1a10ddd12cb2e42e9e in nifi's branch 
refs/heads/main from dan-s1
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=f41f6fea4f ]

NIFI-13850 Simplified TextXMLReader using Current Language and Library 
Practices (#9361)

Signed-off-by: David Handermann <[email protected]>

> Simplify TestXMLReader 2.x with Java 21 constructs, JUnit constructs and NIFI 
> MockFlowFile methods.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-13850
>                 URL: https://issues.apache.org/jira/browse/NIFI-13850
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Daniel Stieglitz
>            Assignee: Daniel Stieglitz
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Some examples
> * Use Files.readString(somePath) instead of new 
> String(Files.readAllBytes(somePath))
> * Use flowFile.getFirst() instead of flowFile.get(0)
> * Use Path for runner.enqueue instead of Inputstream.
> * Use flowFile.getFirst().getContent().split("\n")  instead of new 
> String(runner.getContentAsByteArray(flowFile.get(0)))).split("\n")
> * Remove public from class and test methods.
> * Define paths once for those files read in more than one test.
> * Read the text of the test schema once and reuse instead of reading it for 
> each tests its used in.
> * Use JUnit BeforeEach annotation instead of plain setup method



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to