[
https://issues.apache.org/jira/browse/UIMA-3433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marshall Schor resolved UIMA-3433.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.5.0AS
> UIMA-AS cleanup of semaphore testing wrong thing
> ------------------------------------------------
>
> Key: UIMA-3433
> URL: https://issues.apache.org/jira/browse/UIMA-3433
> Project: UIMA
> Issue Type: Bug
> Components: Async Scaleout
> Affects Versions: 2.4.2AS
> Environment: Fails on IBM Java 7 SR5 with error saying too many
> permits. Earlier versions of this Java (e.g. v 6) don't give this message.
> Reporter: Marshall Schor
> Assignee: Marshall Schor
> Priority: Minor
> Fix For: 2.5.0AS
>
>
> There is a test to clear a semaphore in uima-as as part of the stop method,
> which does
> {code:borderStyle=solid}
> // release all permits
> if ( semaphore != null ) {
> while ( semaphore.availablePermits() > 0) {
> semaphore.release();
> }
> }
> {code}
> Stepping through this shows that each call to release() increases (not
> decreases) the number of availablePermits.
> Replace with drainPermits(), which appears to be the intent.
--
This message was sent by Atlassian JIRA
(v6.1#6144)