Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4693219
Votes 0
Synopsis WIN64: JCK1.4, 5 api/javax_imageio/FileImageOutputStream tests fail
Category java:classes_io
Reported Against hopper-beta
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, Verified, bug
Priority: 4-Low
Related Bugs 4624413
Submit Date 29-MAY-2002
Description
We have fixed this to check whether it is a directory before
deleting the file.


 xxxxx@xxxxx  2002-06-20Filed By       : J2SE-SQA [j2se-tck- xxxxx@xxxxx ]
JDK            : J2SE 1.4.1-b13
JCK            : jck1.4-b17
Platform[s]    : Windows XP 64 bit
switch/Mode    : -Xinterpreter -Xfuture
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Falling test[s]: api/javax_imageio/stream/FileImageOutputStream/index.html#Ctor
                 api/javax_imageio/stream/FileImageOutputStream/index.html#length
                 api/javax_imageio/stream/FileImageOutputStream/index.html#read
                 api/javax_imageio/stream/FileImageOutputStream/index.html#seek
                 api/javax_imageio/stream/FileImageOutputStream/index.html#write

Test creates the file with the name of existing directory. If directory
is on local drive expected exception is thrown; if directory is on
network mapped drive exception is not thrown and existing directory
is replaced by new file. The test uses directory, created by JavaTest
to store results (.jtr files), so destroying this directory makes
results disappear.

Test source location:
=====================
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/javax_imageio/stream/FileImageOutputStream/*.java


jtr file location:
==================
No jtrs (jtrs directory is destroyed by test)

How to reproduce:
=================

Run the following script (you may need to change JCK,JDK and TEMP variables):

--- script start ---
#!/bin/sh

JCK=I:/sail16/JCK/jck14/JCK-runtime-14
JDK=c:/j2sdk1.4.1
#TEMP=C:/temp
TEMP=I:/sail16/a2/temp

if [ -f ${TEMP}/test ]; then
	rm -rf ${TEMP}/test
fi
mkdir -p ${TEMP}/test

flags="-Xfuture -verify -Xinterpreter -Xmx256m -Djava.security.policy=${JCK}/lib/jck.policy"

${JDK}/bin/java -classpath "${JCK}/classes;${JCK}/javatest.jar" ${flags} javasoft.sqe.tests.api.javax.imageio.stream.FileImageOutputStream.CtorTests -TestCaseID Ctor004 -TestWorkDirURL file:///${TEMP}/test/ -TestURL file:///I:/sail16/JCK/jck14/JCK-runtime-14/tests/api/javax_imageio/stream/FileImageOutputStream/index.html#Ctor 
res=$?
if [ "${res}" != "95" ]; then
	echo "*** Test FAILED: ${res}"
else
	echo "*** Test PASSED"
fi
--- script end ---

Test output:
============
Ctor004: Failed. FileNotFoundException was not thrown as expected
STATUS:Failed.tests: 1; failed: 1; first test case failure: Ctor004
*** Test FAILED: 97

Specific Machine Info:
======================
Hostname: jcc-itanium-01
OS: Windows XP 64bit Edition
Work Around
N/A
Evaluation
Looks like a swing class, re-assigning to swing. If this proves to be a runtime issue please re-assign RE to be bobv..
 xxxxx@xxxxx  2002-05-30

The description of this bug is reasonably clear that this is a problem
where opening a FileOutputstream  (where for some reason the File arg
appears to be a directory) on a remote drive destroys the directory.
I think the submitter assigned it to runtime because the fact that it was
an imageio test was judged to be incidental to the problem, since that
seems reaonable I am reassigning to runtime for investigation 

 xxxxx@xxxxx  2002-05-30
=============================


I was unable to reproduce this problem.  I ran the test on
my Windows XP 64 bit edition and set temp to both the C: drive 
and a remote mounted drive H: and the test passed

I would check file permissions or make sure that you are running
a recent version of SAMBA on your server.  It's possible that
the SMB server is not configured properly.


 xxxxx@xxxxx  2002-06-04

Apparently DeleteFile can delete a Directory on some
Samba mounted drives. 


 xxxxx@xxxxx  2002-06-20


Can not reproduce this bug.  Could you point
me out to a machine on Santa Clara campus,
where I could reproduce it.


 xxxxx@xxxxx  2002-06-20
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang