I am guessing that the assumption here is that files being compiled at once
are part of the user's own application, thus he presumably knows what he is
doing and doesn't want to be bothered with the warnings. Given that it is easy
to suppress unwanted deprecation warnings, however, it seems that the warnings
should be handled uniformly.
Reproduced in JDK1.2fcs and JDK1.3-R.
This is handled uniformly between the two compilers, but nowhere is the
desired behavior specified.
I am planning to change the behavior for 1.4.2 (Mantis). The new behavior
will be to suppress deprecation messages only when either (1) the use is within
a deprecated method, or (2) the deprecated method and the use are contained
within the same outermost class. It will no longer matter whether things are
compiled together or separately.
To elaborate on (1), there will be no message when a deprecated class is extended
by a deprecated class, a deprecated method is called by a deprecated method, or
a deprecated super constructor is called from a deprecated constructor.