Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-97028

Invalid API contract around logo/portrait parameter in core Service Builder services

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
    • Fix Version/s: 7.2.X, Master
    • Component/s: Portal Services
    • Labels:
      None

      Description

      com.liferay.portal.util.PortalImpl#updateImageId consumes 2 parameters - a boolean hasImage and byte[] bytes.

      The hasImage param means to update or delete the image. The bytes param then contains the image to be written when hasImage == true and the bytes is not empty.

      The method is used as-is in several local services (Company, Layout, LayoutSet, Organization and User) but with different contract, name and JavaDoc. Example:
      CompanyLocalServiceImpl.java#L877

      	 * @param  logo whether to update the company's logo

      The contract in the local service is different. Here the boolean logo doesn't tell the image will be deleted.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 weeks, 5 days ago

                  Packages

                  Version Package
                  7.2.X
                  Master