Daniel Stieglitz created NIFI-13850:
---------------------------------------

             Summary: Simplify TestXMLReader 2.x with Java 21 constructs 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


Some examples
* Use Files.readString(somePath) instead of new 
String(Files.readAllBytes(somePath))
* Use flowFile.getFirst() instead of flowFile.get(0)
* Use Files.newInputstream instead of InputStream is = new FileInputStream
* Use flowFile.getFirst().getContent().split("\n")  instead of new 
String(runner.getContentAsByteArray(flowFile.get(0)))).split("\n")



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

Reply via email to