Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6856

CheckAndModifyPropertyValueTask still logs a warning even when the pre-existing value is equal to the target new value

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 5.5
    • None
    • None
    • None
    • Saigon 69
    • 3

    Description

      Warning log should not show when current value of property is equal with new value. Here is the unit test that run fails

          @Test
          public void existingPropertyIsReplacedAndNoLog() throws RepositoryException {
              // GIVEN
              final MockNode node = new MockNode("foo");
              node.setProperty("bar", "new-value");
      
              // WHEN
              final PropertyValuesTask pvd = new DummyPropertyValuesDelta();
              pvd.checkAndModifyPropertyValue(ctx, node, "bar", "expected-value", "new-value");
      
              // THEN
              assertEquals("new-value", node.getProperty("bar").getValue().getString());
              verify(ctx, never()).warn(anyString());
          }
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              oanh.thai Oanh Thai Hoang
              oanh.thai Oanh Thai Hoang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoD

                  Time Tracking

                    Estimated:
                    Original Estimate - 2d
                    2d
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 6.5h Time Not Required
                    6.5h