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

As a developer, I would like to always use the most efficient manner of determining type compatibility

    Details

      Description

      This ticket correct improper or inefficient usage of instanceof, isAssignableFrom(), and isInstance().

      In the case where we have an object whose type is to be compared to a variable class, we should use isInstance.

      If for whatever reason we only have access to the classes, then we should use isAssignableFrom.

      In all other cases (eg.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                david.truong David Truong
                Reporter:
                william.newbury William Newbury
                Recent user:
                Christopher Kian
                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 M1