directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn McKinney <mckinney-2...@att.net>
Subject Re: [Fortress] Weird code, I think there is something wrong int it...
Date Tue, 25 Nov 2014 18:39:46 GMT

On 11/25/2014 12:35 PM, Emmanuel L├ęcharny wrote:
> 
> The pb is thatsession.getRoles() returns a List<UserRole>, and later
> down we do : Constraint constraint = (Constraint) roleItems.next();
> 
> We are very likely to get a classCastException here.
> 
> Cn you confirm that ?

Good question.  Constraint is an interface that UserRole implements:

public class UserRole extends FortEntity implements Serializable, Constraint

So the code is ok.

Mime
View raw message