This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 19342
Collapse All | Expand All

(-)org/openide/util/io/NbObjectInputStream.java (+24 lines)
Lines 73-78 Link Here
73
        return c != null ? c : ClassLoader.getSystemClassLoader ();
73
        return c != null ? c : ClassLoader.getSystemClassLoader ();
74
    }
74
    }
75
75
76
    /** Overriden to enhance func to pass also other specified serialVersionUID's
77
     * which are compatible with current class version. */
78
    protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException {
79
        ObjectStreamClass ose = super.readClassDescriptor();
80
        
81
        // XXX #19432: The TXTEditorSupport$Environment with the specified serialVersionUID is also 
82
        // compatible with current one in NB3.3.1., this is short time solution.
83
        // Later there will be created some file mappings of classes with older serialVersionUID's
84
        // compatible with current class. Something simialar what is done with packages
85
        // in Utilities.translate.
86
        if(ose.getSerialVersionUID() == -1490768532464888185L
87
        && "org.netbeans.modules.text.TXTEditorSupport$Environment".equals(ose.getName())) {
88
            ClassLoader cl = getNBClassLoader();
89
            Class clazz = Class.forName(Utilities.translate(ose.getName()), false, cl);
90
            
91
            
92
            ObjectStreamClass o = ObjectStreamClass.lookup(clazz);
93
            
94
            return o;
95
        } else {
96
            return ose;
97
        }
98
    }
99
    
76
    /** Reads an object from the given object input.
100
    /** Reads an object from the given object input.
77
    * The object had to be saved by the {@link NbObjectOutputStream#writeSafely} method.
101
    * The object had to be saved by the {@link NbObjectOutputStream#writeSafely} method.
78
    *
102
    *

Return to bug 19342