NIFI-11363 Fixed precision number handling in Flow Encryption Commands

Signed-off-by: Bence Simon <bsimon@apache.org>
This closes #11363
This commit is contained in:
exceptionfactory 2023-03-29 17:06:31 -05:00 committed by Bence Simon
parent 335552f9ff
commit f61d547e3e
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ public class JsonFlowEncryptor extends AbstractFlowEncryptor {
generator.writeNumber(parser.getIntValue());
break;
case VALUE_NUMBER_FLOAT:
generator.writeNumber(parser.getFloatValue());
generator.writeRawValue(parser.getValueAsString());
break;
case VALUE_TRUE:
generator.writeBoolean(true);

View File

@ -143,7 +143,7 @@ public class StandardFlowEncryptorTest {
private String getSampleFlowJson(final String password) {
Objects.requireNonNull(password);
return String.format("{\"properties\":{\"username\":\"sample_username\",\"password\":\"%s\"}}", password);
return String.format("{\"properties\":{\"username\":\"sample_username\",\"password\":\"%s\",\"position\":1.123456789123456789}}", password);
}
private String getSampleFlowXml(final String password) {