Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/51#discussion_r87499038
  
    --- Diff: 
minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/RunMiNiFi.java 
---
    @@ -1600,9 +1622,13 @@ private void restartInstance() throws IOException {
             }
         }
     
    -    private static void performTransformation(InputStream configIs, String 
configDestinationPath) throws ConfigurationChangeException, IOException {
    -        try {
    -            ConfigTransformer.transformConfigFile(configIs, 
configDestinationPath);
    +    private static ByteBuffer performTransformation(InputStream configIs, 
String configDestinationPath) throws ConfigurationChangeException, IOException {
    +        try (ByteArrayOutputStream byteArrayOutputStream = new 
ByteArrayOutputStream();
    +                TeeInputStream teeInputStream = new 
TeeInputStream(configIs, byteArrayOutputStream)) {
    +
    +            ConfigTransformer.transformConfigFile(teeInputStream, 
configDestinationPath);
    +
    +            return 
ByteBuffer.wrap(byteArrayOutputStream.getUnderlyingBuffer());
    --- End diff --
    
    Ah good catch! I will change to "toByteArray" and re-test


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to