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

As a developer I would like not to create intermediary string when transforming a list into an array

    Details

      Description

      To convert a List of items into an array of values there is a common idiom used in the portal:

      StringUtil.split(ListUtil.toString(xs, accessor))

      This has some problems, like:

      • Only arrays of things representable as strings can be returned.
      • Possible errors when, for example, the string representation of the elements may contain the selected delimiter.

      This LPS adds a new ListUtil.toArray to generate directly the arrays, with no intermediate string serialization.

        Attachments

          Activity

            People

            • Assignee:
              roberto.diaz Roberto Díaz
              Reporter:
              adolfo.perez Adolfo Pérez
              Recent user:
              Shalaka Tendulkar
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.0.0 M3