Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8027992

FileInputStream and BufferedInputStream should be closed in sun.applet.*

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b119

      Description

      Main.java

      try {
      476 FileInputStream in = new FileInputStream(inFile);
      477 tmpProps.load(new BufferedInputStream(in));
      478 in.close();
      479 } catch (IOException e) {
      480 System.err.println(lookup("main.err.prop.cantread",
      481 inFile.toString()));
      482 }

      AppletViewer

      try {
      0672 BufferedOutputStream s = new BufferedOutputStream(new FileOutputStream(file));
      0673 ObjectOutputStream os = new ObjectOutputStream(s);
      0674 showStatus(amh.getMessage("appletsave.err1",
      0675 panel.applet.toString(), file.toString()));
      0676 os.writeObject(panel.applet);
      0677 } catch (IOException ex) {
      0678 System.err.println(amh.getMessage("appletsave.err2", ex));
      0679 } finally {
      0680 panel.sendEvent(AppletPanel.APPLET_START);
      0681 }

      AppletPanel

       else {
      0796 // serName is not null;
      0797 InputStream is = (InputStream)
      0798 java.security.AccessController.doPrivileged(
      0799 new java.security.PrivilegedAction() {
      0800 public Object run() {
      0801 return loader.getResourceAsStream(serName);
      0802 }
      0803 });
      0804 ObjectInputStream ois =
      0805 new AppletObjectInputStream(is, loader);
      0806 Object serObject = ois.readObject();
      0807 applet = (Applet) serObject;
      0808 doInit = false; // skip over the first init
      0809 }

        Attachments

          Activity

            People

            Assignee:
            pchelko Petr Pchelko (Inactive)
            Reporter:
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: