Ticket #109 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Reflective method hasRole can be tricked to answer wrongly

Reported by: stephan Owned by: stephan
Priority: major Milestone: OTDT_1.1.10
Component: compiler Version: 1.1.9
Keywords: Cc:

Description

In one particular situation the reflective method boolean hasRole(Object,Class) wrongly answers true.

Test case is 9.2.1-otjld-has-role-method-5c2.

This happened while trying to use guard predicates to implement role migration (a base object changing its role from one role class to another).

Analysis: The hasRole method uses String-based comparison to check if the requested class is the root of the role hierarchy managed by a given role cache. By comparing tails of names accidentally R1_R matched the root role R, which it must not.

Change History

Changed 4 years ago by stephan

Fixed in r18235 by including the delimiter __OT__ in the name pattern.

Changed 4 years ago by stephan

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.