openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Minor (JIRA)" <>
Subject [jira] Updated: (OPENJPA-1741) Unecessary class load attempts when parsing JPQL
Date Wed, 21 Jul 2010 22:22:50 GMT


David Minor updated OPENJPA-1741:

    Attachment: only-load-uppercase-java-lang.patch

Attached a patch to limit class load attempts for the java.lang package. After attempting
to load a token by itself, and then with the query object's package prepended, QueryImpl.classForName()
currently attempts to load the token with 'java.lang' prepended.

This patch makes the assumption that there are no classes in java.lang starting with a lower
case letter, and skips the load attempt.

> Unecessary class load attempts when parsing JPQL
> ------------------------------------------------
>                 Key: OPENJPA-1741
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 1.2.2, 2.0.0
>            Reporter: David Minor
>         Attachments: cache-class-load-attempts.patch, only-load-uppercase-java-lang.patch,
> 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

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message