Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5415

OrderGroup.setOrders is not a setter

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      The implementation of setOrders is slightly odd:

      ```   
      /**
           * Sets the orders
           *
           * @param orders the orders to set
           */
          public void setOrders(List<Order> orders) {
              for (Order order : orders) {
                  addOrder(order);
              }
          }

      ```
      This means that a set will actually add to any existing orders. The fix is trivial, but I don't know if anyone will be relying on the existing behaviou
       

        Attachments

          Activity

            People

            Assignee:
            samuel34 Samuel Male
            Reporter:
            ilewis Iain Lewis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: