Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1741

Unecessary class load attempts when parsing JPQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.2.2, 2.0.0
    • None
    • query
    • None
    • Patch Available

    Description

      When parsing JPQL, JPQLExpressionBuilder.getPathOrConstant() tries to determine if a token is a java class or enum by doing a class load (via QueryImpl.classForName()). The same token will be tried as often as it appears in the query. It might be better to

      1) cache the results
      2) avoid the lookup if the token is a known variable name

      Attachments

        1. cache-class-load-attempts.patch
          2 kB
          David Minor
        2. skip-known-variables.patch
          0.8 kB
          David Minor
        3. only-load-uppercase-java-lang.patch
          0.7 kB
          David Minor

        Activity

          People

            curtisr7 Richard G. Curtis
            david minor David Minor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: