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

FileChannel.force(true) throws IOException (windows)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 1.4.2
    • core-libs
    • tiger
    • sparc
    • solaris_8


      j2sdk1.4.2 build 12 :
      --------------------

      In win 2k , Xp and 98 Filechannel.force(true) throws "Access is denied " exception if the FileChannel is created from FileInputStream but in case of solaris 8 , solaris 10 and linux RH7.1 , no such exception is thrown. The testcase FCtransferFrom.java is attached.

      Output in Win2k:
      ----------------
      $ java -version
      java version "1.4.2-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b12)

      Java HotSpot(TM) Client VM (build 1.4.2-beta-b12, mixed mode)
      $ javac FCtransferFrom.java
      $ java FCtransferFrom
      --1-- fc1.position=0, fc1.size=1083
      --2-- fc2.position=0, fc2.size=0
      --3-- fc2.position=0, fc2.size=1083
      EXPECTED EXCEPTION java.io.IOException: Access is denied

      ------------------------------------------------------------

      Output in solaris and linux :
      -----------------------------
      aparna:/net/sqindia/export/disk03/coresqe/Aparna/verify 14 % !java
      java FCtransferFrom
      --1-- fc1.position=0, fc1.size=6725
      --2-- fc2.position=0, fc2.size=0
      --3-- fc2.position=0, fc2.size=6725
      --4--
      --5--

      ------------------------------------------------------------



            mmcclosksunw Michael Mccloskey (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: