ChrisSamo632 commented on a change in pull request #4854: URL: https://github.com/apache/nifi/pull/4854#discussion_r589283861
########## File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/test/groovy/org/apache/nifi/properties/NiFiPropertiesLoaderGroovyTest.groovy ########## @@ -472,4 +472,21 @@ class NiFiPropertiesLoaderGroovyTest extends GroovyTestCase { assert readPropertiesAndValues == readPasswordPropertiesAndValues } + + @Test + void testShouldStripWhitespace() throws Exception { + // Arrange + File unprotectedFile = new File("src/test/resources/conf/nifi_with_whitespace.properties") + NiFiPropertiesLoader niFiPropertiesLoader = new NiFiPropertiesLoader() + + // Act + NiFiProperties niFiProperties = niFiPropertiesLoader.load(unprotectedFile.path) + + // Assert + assert niFiProperties.getProperty("nifi.whitespace.propWithLeadingSpace") == "foo"; + assert niFiProperties.getProperty("nifi.whitespace.propWithTrailingSpace") == "foo"; + assert niFiProperties.getProperty("nifi.whitespace.propWithLeadingAndTrailingSpace") == "foo"; + assert niFiProperties.getProperty("nifi.whitespace.propWithTrailingTab") == "foo"; Review comment: JDK 11 build failed still, though can't see from the errors whether that's caused by your changes or an intermittent issue with the build (and therefore whether a simple re-execution of that check may let it pass)? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org