[ http://issues.apache.org/jira/browse/HARMONY-40?page=comments#action_12363701 ]
Vladimir Strigun commented on HARMONY-40: ----------------------------------------- I can't attach testcase, so posting it as a comment: /* Copyright 2005 The Apache Software Foundation or its licensors, as applicable * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.tests.java.io; import java.io.File; import java.io.FileOutputStream; import java.nio.channels.FileChannel; import junit.framework.TestCase; public class FileOutputStreamTest extends TestCase { /** * @tests java.io.FileOutputStream#close() */ public void test_close() throws Exception { File logFile = File.createTempFile("out", "tmp"); logFile.deleteOnExit(); FileOutputStream out = new FileOutputStream(logFile, true); FileChannel channel = out.getChannel(); out.write(1); out.close(); assertFalse("Channel is still open", channel.isOpen()); } } > FileChannel assotiated with FileOutputStream not closed after closing output > stream > ----------------------------------------------------------------------------------- > > Key: HARMONY-40 > URL: http://issues.apache.org/jira/browse/HARMONY-40 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Vladimir Strigun > > When I receive FileChannel from file output stream, write something to stream > and then close it, channel, assotiated with the stream is still open. I'll > attach unit test for the issue. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira