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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Saigon 69
    • Story Points:
      3
    • Magnolia Release:
      5.5

      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());
          }
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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