JDK-4809657 : RFE: Support for dependant properties in JavaBeans
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-01-29
  • Updated: 2021-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Expression.getValue(Expression.java:101)
        at
java.beans.Encoder.getValue(Encoder.java:84)
        at
java.beans.Encoder.get(Encoder.java:186)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:9
7)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersiste
nceDelegate.java:242)
 
       at
java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDele
gate.java:335)
 
       at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:395)
 
       at
java.beans.javax_swing_JFrame_PersistenceDelegate.initialize(MetaData
.java:510)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:253)
        at
Junk.XML$1.windowClosing(XML.java:72)
        at
java.awt.Window.processWindowEvent(Window.java:1102)
        at
javax.swing.JFrame.processWindowEvent(JFrame.java:266)
        at
java.awt.Window.processEvent(Window.java:1061)
        at
java.awt.Component.dispatchEventImpl(Component.java:3598)
        at
java.awt.Container.dispatchEventImpl(Container.java:1623)
        at
java.awt.Window.dispatchEventImpl(Window.java:1585)
        at
java.awt.Component.dispatchEvent(Component.java:3439)
        at
java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
 
       at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
 
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
java.lang.Exception:
discarding statement JFrame0.addWindowListener(XML$10);
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:339)
        at
java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersiste
nceDelegate.java:242)
 
       at
java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDele
gate.java:335)
 
       at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:395)
 
       at
java.beans.javax_swing_JFrame_PersistenceDelegate.initialize(MetaData
.java:510)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:253)
        at
Junk.XML$1.windowClosing(XML.java:72)
        at
java.awt.Window.processWindowEvent(Window.java:1102)
        at
javax.swing.JFrame.processWindowEvent(JFrame.java:266)
        at
java.awt.Window.processEvent(Window.java:1061)
        at
java.awt.Component.dispatchEventImpl(Component.java:3598)
        at
java.awt.Container.dispatchEventImpl(Container.java:1623)
        at
java.awt.Window.dispatchEventImpl(Window.java:1585)
        at
java.awt.Component.dispatchEvent(Component.java:3439)
        at
java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
 
       at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
 
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Reading
java.lang.IllegalArgumentException:
index == 4
Continuing ...

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.io.*;
import javax.swing.*;

public class OrderTest {

    public static void main(final String[] args) {
        final JFrame f = new JFrame("Boogers");
        
	JPanel load = new JPanel(new GridLayout(2, 1, 0, 0));
        JLabel label = new JLabel("Label:");
        
	load.add(label);
        JTextField field = new JTextField("Text");
        load.add(field);
        
	label.setLabelFor(field);
        label.setDisplayedMnemonicIndex(4);
        
	load.setBorder(BorderFactory.createEtchedBorder());
        
	f.getContentPane().add(load);
        f.pack();
        f.setLocation(100, 100);
        
	f.setVisible(true);
        f.addWindowListener(new WindowAdapter() {
		public void
		    windowClosing(WindowEvent evt) {
		    try {
			f.setVisible(false);
                    
			System.err.println("Writing");
			OutputStream out = new BufferedOutputStream(new FileOutputStream(args[0]));
			XMLEncoder xmle = new XMLEncoder(out);
			ExceptionListener el = new ExceptionListener() {
				public void exceptionThrown(Exception e) {
				    e.printStackTrace();
				} //Ends method exceptionThrown
			    };
                    
			xmle.setExceptionListener(el);
			xmle.writeObject(f);
			xmle.close();
                    
			f.dispose();
			System.err.println("Reading");
			InputStream in = new BufferedInputStream(new FileInputStream(args[0]));
			XMLDecoder xmld = new XMLDecoder(in);
                    
			xmld.setExceptionListener(el);
			JFrame f2 = (JFrame)xmld.readObject();
                    
			xmld.close();
			f2.setDefaultCloseOperation(f2.EXIT_ON_CLOSE);
                    
			f2.setVisible(true);
		    } catch (Exception e) {
			e.printStackTrace();
		    } //Ends

		} //Ends method windowClosing
	    }); //Ends addWindowListener
    } //Ends method
} 

---------- END SOURCE ----------
(Review ID: 180482) 
======================================================================
Name: rl43681			Date: 01/28/2003


FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-
b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version
5.00.2195]

A DESCRIPTION OF THE PROBLEM :
I was using the XMLEncoder & XMLDecoder to save some graphical beans (a
JFrame with a few simple components added) and I noticed that while some
of the properties of the components were order-dependant, they were not
saved that way.

For example, if you use
JLabel.setDisplayedMnemonicIndex() before you use
JLabel.setText(), you get an ArrayIndexOutOfBoundsException.  The
XMLEncoder stores the properties willy-nilly and so when you retrieve
the object with a decoder, the displayedMnemonicIndex property gets
set before the text property and you get the exception.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.  Compile the sample code
2.  Run it.
3.  Observe the exceptions being
thrown

EXPECTED VERSUS ACTUAL BEHAVIOR :
I would expect that either one of two things:
1.  The beans would be able
to indicate dependant properties in some manner, and the XMLEncoder
would respect the dependancies.

or

2.  The beans specification
would state (maybe it does, I don't know) that properties must be
independant, and the swing beans would then implement their properties
in such a manner that you can set the displayedMnemonicIndex before you
set the text.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Writing
java.lang.IllegalArgumentException: index == 4
        at
javax.swing.JLabel.setDisplayedMnemonicIndex(JLabel.java:548)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
 
       at java.lang.reflect.Method.invoke(Method.java:324)
        at
java.beans.Statement.invoke(Statement.java:470)
        at
java.beans.Statement.execute(Statement.java:119)
        at
java.beans.Encoder.execute(Encoder.java:94)
        at
java.beans.Encoder.writeStatement(Encoder.java:238)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersiste
nceDelegate.java:242)
 
       at
java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDe
legate.java:236)
 
       at
java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDele
gate.java:254)
 
       at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:395)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersiste
nceDelegate.java:242)
 
       at
java.beans.java_awt_Container_PersistenceDelegate.initialize(MetaData
.java:400)
 
       at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:19
1)
        at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:393)
 
       at
java.beans.javax_swing_JComponent_PersistenceDelegate.initialize(Meta
Data.java:587)
 
       at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:19
1)
        at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:393)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersiste
nceDelegate.java:242)
 
       at
java.beans.java_awt_Container_PersistenceDelegate.initialize(MetaData
.java:400)
 
       at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:19
1)
        at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:393)
 
       at
java.beans.javax_swing_JComponent_PersistenceDelegate.initialize(Meta
Data.java:587)
 
       at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:19
1)
        at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:393)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDe
legate.java:219)
 
       at
java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDele
gate.java:254)
 
       at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:395)
 
       at
java.beans.javax_swing_JFrame_PersistenceDelegate.initialize(MetaData
.java:510)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:253)
        at
Junk.XML$1.windowClosing(XML.java:72)
        at
java.awt.Window.processWindowEvent(Window.java:1102)
        at
javax.swing.JFrame.processWindowEvent(JFrame.java:266)
        at
java.awt.Window.processEvent(Window.java:1061)
        at
java.awt.Component.dispatchEventImpl(Component.java:3598)
        at
java.awt.Container.dispatchEventImpl(Container.java:1623)
        at
java.awt.Window.dispatchEventImpl(Window.java:1585)
        at
java.awt.Component.dispatchEvent(Component.java:3439)
        at
java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
 
       at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
 
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
java.lang.Exception:
discarding statement JLabel0.setDisplayedMnemonicIndex(Inte
ger0);
        at
java.beans.Encoder.execute(Encoder.java:98)
        at
java.beans.Encoder.writeStatement(Encoder.java:238)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersiste
nceDelegate.java:242)
 
       at
java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDe
legate.java:236)
 
       at
java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDele
gate.java:254)
 
       at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:395)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersiste
nceDelegate.java:242)
 
       at
java.beans.java_awt_Container_PersistenceDelegate.initialize(MetaData
.java:400)
 
       at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:19
1)
        at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:393)
 
       at
java.beans.javax_swing_JComponent_PersistenceDelegate.initialize(Meta
Data.java:587)
 
       at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:19
1)
        at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:393)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.DefaultPersistenceDelegate.invokeStatement(DefaultPersiste
nceDelegate.java:242)
 
       at
java.beans.java_awt_Container_PersistenceDelegate.initialize(MetaData
.java:400)
 
       at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:19
1)
        at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:393)
 
       at
java.beans.javax_swing_JComponent_PersistenceDelegate.initialize(Meta
Data.java:587)
 
       at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:19
1)
        at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:393)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDe
legate.java:219)
 
       at
java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDele
gate.java:254)
 
       at
java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDe
legate.java:395)
 
       at
java.beans.javax_swing_JFrame_PersistenceDelegate.initialize(MetaData
.java:510)
 
       at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
03)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeExpression(Encoder.java:260)
        at
java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
        at
java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:1
00)
        at
java.beans.Encoder.writeObject(Encoder.java:55)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
        at
java.beans.Encoder.writeObject1(Encoder.java:192)
        at
java.beans.Encoder.cloneStatement(Encoder.java:205)
        at
java.beans.Encoder.writeStatement(Encoder.java:236)
        at
java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)
        at
java.beans.XMLEncoder.writeObject(XMLEncoder.java:253)
        at
Junk.XML$1.windowClosing(XML.java:72)
        at
java.awt.Window.processWindowEvent(Window.java:1102)
        at
javax.swing.JFrame.processWindowEvent(JFrame.java:266)
        at
java.awt.Window.processEvent(Window.java:1061)
        at
java.awt.Component.dispatchEventImpl(Component.java:3598)
        at
java.awt.Container.dispatchEventImpl(Container.java:1623)
        at
java.awt.Window.dispatchEventImpl(Window.java:1585)
        at
java.awt.Component.dispatchEvent(Component.java:3439)
        at
java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
 
       at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
 
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
java.lang.InstantiationException:
Junk.XML$1
        at java.lang.Class.newInstance0(Class.java:291)
        at
java.lang.Class.newInstance(Class.java:259)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
 
       at java.lang.reflect.Method.invoke(Method.java:324)
        at
java.beans.Statement.invoke(Statement.java:470)
        at
java.beans.

Comments
- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014

These are all approved for deferral to JDK 9 so you can update the FixVersion to state JDK 9. Kind regards, Mathias
29-08-2013

These are all approved for deferral to JDK 9 so you can update the FixVersion to state JDK 9. Kind regards, Mathias
29-08-2013

These are all approved for deferral to JDK 9 so you can update the FixVersion to state JDK 9. Kind regards, Mathias
29-08-2013

Converted "8-client-defer-candidate" label to "8-defer-request" by SQE' OK.
15-08-2013

*This is anti-deferral criteria list*: - P2 -------------- Engineering's Criteria ------------------------------------- - tck-red labeled - conformance labeled - P3 regressions reported/labeled against jdk8 - findbugs, parfait, eht labeled bugs - CAP <1 year reported - netbeans <1 year reported Victor ----------------- SQE's OK --------------------------------- Yes, we are ok with that thanks, Mikhail
15-08-2013

WORK AROUND The XMLEncoder will use the the order or the property descriptor array that it retrieves from the Introspector. Since 1.4, this is now ordered by the name of the property. One workaround is to rename methods so that properties that must be exectued first should have property names that come sooner in the alphabet. ###@###.### 2003-04-07
07-04-2003

EVALUATION This is similar in context to 4178930 and has been asked for by several high profile licencees and customers. We should commit this to Tiger. ###@###.### 2003-01-29 We may break this out as a seperate bug. A smaller version of the test case is: import java.beans.*; import javax.swing.JLabel; public class Test { public static void main(String[] args) { JLabel label = new JLabel("Test Text"); label.setDisplayedMnemonicIndex(0); ExceptionListener el = new ExceptionListener() { public void exceptionThrown(Exception e) { e.printStackTrace(); } }; XMLEncoder e = new XMLEncoder(System.out); e.setExceptionListener(el); e.writeObject(label); e.close(); } } It appears that the xml is written correctly however, when it is interpreted, the mnemmonicIndex property should be set after the text property. ###@###.### 2003-04-07 Unfortunately, the time for implementing features is over so this issue will have to be addressed in the next major release. ###@###.### 2003-10-17
07-04-2003