Ticket #109 (closed defect: fixed)
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
Note: See
TracTickets for help on using
tickets.
all news
RSS feed