This is the mail archive of the
mailing list for the Mauve project.
Re: java.lang.Thread.priority patch
- From: Stephen Crawley <crawley at dstc dot edu dot au>
- To: Ingo Prötel <proetel at aicas dot com>
- Cc: mauve-patches at sources dot redhat dot com, crawley at piglet dot dstc dot edu dot au
- Date: Sat, 16 Aug 2003 02:29:53 +1000
- Subject: Re: java.lang.Thread.priority patch
On the face of it, your patch looks harmless, because it won't break any
JDK compatible implementation of Java. However, I don't think it should
be applied. My reasoning is as follows:
1) The purpose of Mauve is to provide an open source test suite
for conformance of Java implementations for the relevant standards.
The ultimate aim is to help portability of Java applications across
as wide a range of Java implementations.
2) Since we cannot compare Mauve with Sun's JCP test suites, our
"gold standard" for conformance is what the Sun JDK's do, and
the Sun javadocs say.
3) The Sun JDKs and javadocs define the value of Thread.MAX_PRIORITY
to be 10. There is a clear implication that a Thread instance cannot
have a priority greater than the value of MAX_PRIORITY.
4) While it is arguably wrong for a programmer to assume MAX_PRIORITY
is 10, it would be quite reasonable to assume that priorities are
never greater than MAX_PRIORITY ... and code Java applications to
rely on this fact.
5) If the Mauve test suite were to say that priorities > MAX_PRIORITY
are "conformant", we might be doing programmers a disservice by
not pointing out portability issues with certain Java implementations.