-
Apr 24th, 2008, 03:02 PM
#1
2.0 GrantedAuthority cannot be an enum
I was upgrading to spring-security today from acegi. I usually store my GrantedAuthorities as Java 5 enums, to me this is perfect use case for enum.
It seems in spring-security I cannot do this though I get the compile error.
The interface Comparable cannot be implemented more than once with different arguments: Comparable<ApplicationPermission> and Comparable.
Since ApplicationPermission is an enum and base class of enum implements the generic Comparable, and GrantedAuthority now implements Object Comparable.
Does anybody know a workaround for this?
-
Nov 6th, 2008, 08:02 AM
#2
I'm looking into updating an app and ditching acegi for spring security and I'm facing the same problem.
Any suggestions?
Enum roles do fit like a glove.
-
Nov 21st, 2008, 08:54 AM
#3
Hello,
I'm facing the same problem as well. Is there any fix or workaround for this ? I'm testing the migration to Spring Security 2 on a smaller app before I do it for our company's major systems.
Alex Marshall
-
Nov 21st, 2008, 10:37 AM
#4
Hey guys,
I've written an acceptable (at least for myself) workaround and posted it on my blog if you're interested. It took all of 90 minutes to research, write, test and post :
On Hibernate UserTypes
Alex Marshall
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules