[jbossseam-issues] [JBoss JIRA] Moved: (JBSEAM-3556) Member variable for @UserPrincipal Annotation must be public even if there is a public getter for this member variable with @UserPrincipal Annotation

Pete Muir (JIRA) jira-events at lists.jboss.org
Tue Oct 14 06:23:20 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBSEAM-3556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir moved SECURITY-290 to JBSEAM-3556:
--------------------------------------------

     Project: Seam  (was: JBoss Security and Identity Management)
         Key: JBSEAM-3556  (was: SECURITY-290)
    Security:     (was: Public)


> Member variable for @UserPrincipal Annotation must be public even if there is a public getter for this member variable with @UserPrincipal Annotation
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-3556
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3556
>             Project: Seam
>          Issue Type: Bug
>         Environment: WinXp pro / eclpise 3.4 / Jboss Server 2.4 R
>            Reporter: Marco Röösli
>            Assignee: Anil Saldhana
>
> I can't add @UserPrincipal just to a public getter Method.
> My Entity:
> ....
> @Column(name = "USERNAME", length = 16, nullable = false, unique = true)
> private String username;
> @UserPrincipal
> public String getUsername() {
>                 return username;
> }
> With this code above i get this Error:
> Caused by: java.lang.IllegalAccessException: Class org.jboss.seam.util.Reflections can not access a member of class ch.pomop.dummy.security.UserAccount with modifiers "private"
>         at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
>         at java.lang.reflect.Field.doSecurityCheck(Field.java:954)
>         at java.lang.reflect.Field.getFieldAccessor(Field.java:895)
>         at java.lang.reflect.Field.get(Field.java:357)
>         at org.jboss.seam.util.Reflections.get(Reflections.java:51)
>         at org.jboss.seam.util.Reflections.getAndWrap(Reflections.java:88)
>         ... 83 more
> Is it necessary to set the members public? or is this a bug?
> As i changed the my Entity Code to:
> My Entity:
> @UserPrincipal
> @Column(name = "USERNAME", length = 16, nullable = false, unique = true)
> public String username;
> }
> it worked but I don't want to set my members public if there is an other way
> thx for help

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the seam-issues mailing list