Community
Participate
Working Groups
In the following method, I get an error on the line that says osi.readObject(). When I use the "add catch clause" quick fix, the catch clause is added commented . private void load() throws IOException { try { ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new FileInputStream(location))); contentStatus = (Set) ois.readObject(); } catch (IOException e) { e.printStackTrace(); } // if (!location.exists()) // return; // DataInputStream input = new DataInputStream(new BufferedInputStream(new FileInputStream(location))); // try { // if (input.readInt() != FILE_VERSION) // return; // int size = input.readInt(); // registry = new HashMap(size); // for (int i = 0; i < size; i++) { // String key = input.readUTF(); // int refCount = input.readInt(); // Set collection = new HashSet(); // for (int j = 0; j < refCount; j++) { // String id = input.readUTF(); // Version version = new Version(input.readUTF()); // collection.add(new Reference(id, version)); // } // registry.put(key, collection); // } // } finally { // try { // input.close(); // } catch (IOException e) { // // ignore // } // } }
same bug that results in bug 95839 *** This bug has been marked as a duplicate of 95839 ***