The Open Anzo Project

Semantic Application Middleware

Ticket #93 (closed defect: fixed)

Opened 1 year ago

Last modified 9 months ago

intermittent failure: testRemoteAnon throws NPE

Reported by: jpbetz Assigned to: mroy
Priority: major Milestone: 3.0 milestone1
Component: openanzo Version: 3.0
Keywords: stability Cc:

Description (Last modified by mroy)

The NPE is on the second line of ModelServiceApi?:

if (adminUsersCache.containsKey(userId)) {
  Boolean isSystemUser = (Boolean) adminUsersCache.get(userId);
return isSystemUser.booleanValue();
}

There is a rare case where the if statement returns true but the following get returns null which threw the NPE. This looks to be a concurrency issue on the LRUMap adminUsersCache.

To fix:

Boolean isSystemUser = (Boolean) adminUsersCache.get(userId);
if (isSystemUser != null) {
  return isSystemUser.booleanValue();
}

and synchronize adminUsersCache.

Change History

11/04/07 11:01:38 changed by jpbetz

  • status changed from new to assigned.

assigning to self

11/04/07 11:35:01 changed by jpbetz

(In [698]) re #93 reviewer: mroy

Fix intermittent failures related to improper handling of LRUMaps.

11/04/07 11:35:48 changed by jpbetz

  • owner changed from jpbetz to mroy.
  • status changed from assigned to new.

reassigning to mroy for review

03/31/08 10:14:23 changed by mroy

  • status changed from new to closed.
  • resolution set to fixed.
  • description changed.
Copyright © 2007 - 2008 OpenAnzo.org