Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-5

InstanceIdentifierBuilder needs to be a copy-based builder

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Won't Do
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    Description

      The default InstanceIdentifierBuilder needs to be a copy builder, such that it has stable state and the following code is valid (seen in the wild):

      InstanceIdentifierBuilder<Foo> foob = InstanceIdentfier.builder(Foo.class);

      dataProviderService.removeOperationalData(foob.augmentation(Bar.class).build));
      dataProviderService.removeOperationalData(foob.augmentation(Baz.class).build));

      Once it is stable, also add hashCode()/equals() so it can be kept around safely.

      The current mutable version may be retained as an explicit MutableInstanceIdentifierBuilder or something of that kind.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: