Wicket
  1. Wicket
  2. WICKET-5386

ChainingModel should not check if the modelObject given as argument is null

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.11.0
    • Fix Version/s: 6.12.0, 7.0.0
    • Component/s: wicket
    • Labels:
      None

      Description

      In Wicket 1.5.x there was no check against the null value of the target of a CompoundPropertyModel.

      This allowed to define a CPM based on a possibly value, then being able to refer to sub-properties of that value in through labels included in the markup without fearing a NullPointerException, nice empty labels would be displayed instead.

      Now that CPM has been refactored, null values are explicitly rejected, but only in the constructor.
      Changing the model through a call to setObject doesn't check the null value and allows the previous behaviour to work again.
      (another workaround is to pass Model.of(value) in the constructor).

      These are workarounds, the check itself adds no value and removes functionality.

        Activity

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Frédéric Donckels
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 20m
              20m
              Remaining:
              Remaining Estimate - 20m
              20m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development