/** Reads the object and initialize */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { Object firstObject = in.readObject(); /* Get rid of backward compatibility if (firstObject instanceof DataObject) { DataObject obj = (DataObject)firstObject; support = (CloneableEditorSupport) obj.getCookie(CloneableEditorSupport.class); } else */ { // first object is environment CloneableEditorSupport.Env env = (CloneableEditorSupport.Env) firstObject; support = (CloneableEditorSupport) env.findCloneableOpenSupport(); } if (support == null) { //PENDING - what about now ? does exist better way ? throw new IOException(); } }
/** Reads the object and initialize */ private void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException { Object firstObject = in.readObject(); /* Get rid of backward compatibility if (firstObject instanceof DataObject) { DataObject obj = (DataObject)firstObject; support = (CloneableEditorSupport) obj.getCookie(CloneableEditorSupport.class); } else */ { // first object is environment CloneableEditorSupport.Env env = (CloneableEditorSupport.Env)firstObject; support = (CloneableEditorSupport)env.findCloneableOpenSupport (); } if (support == null) { //PENDING - what about now ? does exist better way ? throw new IOException(); } }
/** Reads the object and initialize */ private void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException { Object firstObject = in.readObject(); /* Get rid of backward compatibility if (firstObject instanceof DataObject) { DataObject obj = (DataObject)firstObject; support = (CloneableEditorSupport) obj.getCookie(CloneableEditorSupport.class); } else */ { // first object is environment CloneableEditorSupport.Env env = (CloneableEditorSupport.Env)firstObject; support = (CloneableEditorSupport)env.findCloneableOpenSupport (); } if (support == null) { //PENDING - what about now ? does exist better way ? throw new IOException(); } }