mirror of https://github.com/apache/nifi.git
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:
parent
21a27c8bb0
commit
f89ea8cf21
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue