Index: org/openide/util/io/NbObjectInputStream.java =================================================================== RCS file: /cvs/openide/src/org/openide/util/io/NbObjectInputStream.java,v retrieving revision 1.19 diff -u -r1.19 NbObjectInputStream.java --- org/openide/util/io/NbObjectInputStream.java 15 Aug 2001 23:28:48 -0000 1.19 +++ org/openide/util/io/NbObjectInputStream.java 15 Jan 2002 16:27:29 -0000 @@ -73,6 +73,30 @@ return c != null ? c : ClassLoader.getSystemClassLoader (); } + /** Overriden to enhance func to pass also other specified serialVersionUID's + * which are compatible with current class version. */ + protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException { + ObjectStreamClass ose = super.readClassDescriptor(); + + // XXX #19432: The TXTEditorSupport$Environment with the specified serialVersionUID is also + // compatible with current one in NB3.3.1., this is short time solution. + // Later there will be created some file mappings of classes with older serialVersionUID's + // compatible with current class. Something simialar what is done with packages + // in Utilities.translate. + if(ose.getSerialVersionUID() == -1490768532464888185L + && "org.netbeans.modules.text.TXTEditorSupport$Environment".equals(ose.getName())) { + ClassLoader cl = getNBClassLoader(); + Class clazz = Class.forName(Utilities.translate(ose.getName()), false, cl); + + + ObjectStreamClass o = ObjectStreamClass.lookup(clazz); + + return o; + } else { + return ose; + } + } + /** Reads an object from the given object input. * The object had to be saved by the {@link NbObjectOutputStream#writeSafely} method. *