rzo1 opened a new pull request, #169: URL: https://github.com/apache/openjpa/pull/169
`Query.setTimeout(null)` passed the null straight to `setHint()`, which drove it through `FetchConfigurationImpl.setHint()` into a reflective call of `setQueryTimeout(int)` and failed with a `bad-hint-value` `IllegalArgumentException`. So a timeout set through this API could never be cleared — on queries it did not silently ignore the null, it threw — and `getTimeout()` kept reporting the stale value. A null timeout now restores the timeout the query inherits from its entity manager, which is what the query would have used had `setTimeout()` never been called. Deliberately not `FetchPlan.DEFAULT`, which resolves to the `OpenJPAConfiguration` value and would discard an entity-manager-scoped timeout the caller never set here. `getTimeout()` reports the effective fetch plan value rather than the recorded hint, so it cannot disagree with what the query will actually use, and `StoredProcedureQueryImpl` delegates both methods to its query so the two cannot drift apart. `EntityManagerImpl` carries a `setTimeout`/`getTimeout` pair too, but those implement `EntityTransaction` — a transaction timeout in seconds — and are left alone here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
