JCK : JCK6a b05
J2SE : FAIL - JDK7 b06, PASS JDK6 b104, JDK6u1 b03
Platform[s] : FAIL - seems to be all
switch/Mode : FAIL - default
Test api/java_io/FileInputStream/index.html#Finalize[Finalize0001] fails against JDK 7 since b06. Test verifies that "protected void FileInputStream.finalize() Ensures that the close method of this file input stream is called when there are no more references to it."
Tests opens file, calls finalize and then expects file to be closed. File is not closed since JDK 7 b06.
Steps to reproduce:
1 create empty file zeroleng.dat in the current directory.
2 compile and run the code from comment.
it will report:
C:\tests\finalize>Z:/Links/stt/jdk_promotions/JDK6u1/b03/binaries/windows-i586/jdk1.6.0_01/bin/java -showversion -cp . FinalizeTests
java version "1.6.0_01-ea"
Java(TM) SE Runtime Environment (build 1.6.0_01-ea-b03)
Java HotSpot(TM) Client VM (build 1.6.0_01-ea-b03, mixed mode)
C:\tests\finalize>Z:/Links/stt/jdk_promotions/JDK7.0/b06/binaries/windows-i586/jdk1.7.0/bin/java -showversion -cp . FinalizeTests
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b06)
Java HotSpot(TM) Client VM (build 1.7.0-ea-b06, mixed mode)
close() method is not called