io - wrong ex name

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 7
    • Component/s: docs
    • generic
    • generic

      Please be aware that there is mistake in this page:

      http://download.oracle.com/javase/tutorial/essential/io/file.html

      In this code:

      Path file = ...;
      try {
          file.createFile(); //Create the empty file with default permissions, etc.
      } catch (FileAlreadyExists x) {
          System.err.format("file named %s already exists%n", file);
      } catch (IOException x) {
          //Some other sort of failure, such as permissions.
          System.err.format("createFile error: %s%n", x);
      }

      There is no exception by the name "FileAlreadyExists"

            Assignee:
            Unassigned
            Reporter:
            Sowmya Kannan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: