[netbeans] Netbeans addresses RI-specific private fields
--------------------------------------------------------
Key: HARMONY-3281
URL: https://issues.apache.org/jira/browse/HARMONY-3281
Project: Harmony
Issue Type: Bug
Components: App-Oriented Bug Reports
Reporter: Vasily Zakharov
Priority: Trivial
Netbeans class org.netbeans.modules.editor.EditorModule uses reflection to address RI-specific
private fields kitRegistryKey and kitTypeRegistryKey in class javax.swing.JEditorPane.
The mentioned code is generally equivalent to this:
try {
Field field = JEditorPane.class.getDeclaredField("kitRegistryKey");
field.setAccessible(true);
Object key = field.get(JEditorPane.class);
} catch (Throwable t) {
t.printStackTrace();
}
The code is properly wrapped and exceptions are caught, and no serious problems occur, but
nasty NoSuchFieldException stack traces appear in Netbeans log
file, so one may think this is a bug in Harmony. In fact, it is not.
Here's an example of such stack trace from the Netbeans log file:
java.lang.NoSuchFieldException: kitRegistryKey
at java.lang.Class.getDeclaredField(Class.java:440)
at org.netbeans.modules.editor.EditorModule.restored(EditorModule.java:134)
at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:365)
at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:280)
at org.netbeans.ModuleManager.enable(ModuleManager.java:903)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:383)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:389)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:316)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:249)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:211)
at org.netbeans.core.startup.Main.start(Main.java:377)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java)
at java.lang.Thread.run(Thread.java:660)
Here's the discussion of this issue in the dev-list: http://thread.gmane.org/gmane.comp.java.harmony.devel/24441
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|