NIFI-6645: Fixed problem in unit test for StandardParameterContext because behavior changed; fixed issue in StandardParameterContext around adding a parameter with no description

This closes #3714.

Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
Mark Payne 2019-09-09 14:59:40 -04:00 committed by Bryan Bende
parent 21a27c8bb0
commit f89ea8cf21
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
2 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ public class StandardParameterContext implements ParameterContext {
// We know that the Parameters have the same name, since this is what the Descriptor's hashCode & equality are based on. The only thing that may be different
// is the description. And since the proposed Parameter does not have a Description, we want to use whatever is currently set.
return oldParameter == null ? null : oldParameter.getDescriptor();
return oldParameter == null ? descriptor : oldParameter.getDescriptor();
}
@Override

View File

@ -125,7 +125,7 @@ public class TestStandardParameterContext {
abcParam = context.getParameter("abc").get();
assertEquals(abcDescriptor, abcParam.getDescriptor());
assertEquals("Updated Again", abcParam.getDescriptor().getDescription());
assertNull(abcParam.getValue());
assertEquals("321", abcParam.getValue());
}
@Test