Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-2107

Use getResultList instead of getSingleResult for JPA queries

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: EJBCA 4.0.0
    • Fix Version/s: EJBCA 4.0.2
    • Component/s: PKI core
    • Labels:
      None

      Description

      Since exceptions are expensive (messes with garbage collections) and we always swallow NoResultException to return null when no entity was found we might as well use getResultList instead and avoid the exception being thrown in the first place.

      org.ejbca.core.ejb.QueryResultWrapper and all classes depending on it will be modified.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              johan Johan Eklund
              Reporter:
              johan Johan Eklund
              Verified by:
              Tomas Gustavsson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: