[
https://issues.apache.org/jira/browse/FELIX-3399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Valentin Valchev updated FELIX-3399:
------------------------------------
Attachment: testpkg.zip
That's fairly easy to reproduce even outside the Web Console.
The problem is that the method is not accessible. I've created a sample test,
which is attached.
When run, it prints the following:
{code}
public void testpkg.inner.TestX$Inner.printConfiguration(java.io.PrintStream)
Exception in thread "main" java.lang.IllegalAccessException: Class testpkg.Test
can not access a member of class testpkg.inner.TestX$Inner with modifiers
"public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.reflect.Method.invoke(Method.java:588)
at testpkg.Test.main(Test.java:22)
{code}
I think that this is absolutely normal. Yes, we can do 'setAccessible(true)' on
that method, but ... really? Do we want it?
> Configuration Printers which do not implement the ConfigurationPrinter
> interface cannot be defined in inner classes
> -------------------------------------------------------------------------------------------------------------------
>
> Key: FELIX-3399
> URL: https://issues.apache.org/jira/browse/FELIX-3399
> Project: Felix
> Issue Type: Bug
> Components: Web Console
> Affects Versions: webconsole-3.1.8
> Reporter: Justin Edelson
> Attachments: testpkg.zip
>
>
> FELIX-2649 added support for Configuration Printers which do not explicitly
> implement the ConfigurationPrinter interface. However, I've discovered that
> if the Configuration Printer service is defined as an inner class, this does
> not work. The printer is displayed in the Configuration Status plugin with
> the correct title, but the content is not rendered (and the
> printConfiguration method is never invoked). No error message is logged.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira