Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-671

Support beans that are defined in nested private classes but have public property read/write methods or fields

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 6.3-milestone-2
    • 6.3-milestone-1
    • Properties
    • None
    • N/A
    • N/A

    Description

      It is an apparently well known problem with java reflections that does not allow dynamic method invocation on private nested classes, even if the method modifiers are public.

      We should apply by default the official workaround by issuing a

      setAccessible(true)

      on the methods to be invoked().

      In the unlikely event that a security manager will reject our request for setAccessible(true), we can just log the exception and move along.

      The other option is for beans to avoid being private classes in the first place, but IMO it would be better for us to avoid problems altogether.

      Attachments

        Activity

          People

            enygma Eduard Moraru
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: