harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject [classlib][nio] FileChannel.tryLock() does not work on Linux
Date Tue, 23 Oct 2007 10:09:02 GMT
I'm bringing the conversation in HARMONY-4989 [1] over to the dev list,
go read that JIRA for the background...

The FileLock spec in Java 5 [2] is full of caveats about how the
underlying OS behavior comes through into Java.  There is a whole
section on platform dependencies.

The test case fails on Linux with Harmony, Sun 1.5, and IBM 1.5 (thanks
to Mark for checking these); but passes on Sun 1.6.  So in the first
instance it seems we are behaving like other 1.5 implementations.

The test itself breaks a warning in the spec, that "It is strongly
recommended that, within a program, a unique channel be used to acquire
all locks on any given file." presumably due to these this platform
behavior differences again.

My inclination at the moment is to mark this as won't fix.  But I'm
interested to hear alternative arguments.

[1] https://issues.apache.org/jira/browse/HARMONY-4989
[2] http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileLock.html


View raw message