My understanding is this is expected behavior. At runtime no reference
is ever made to the interface class because the constants have been
compiled-in so to speak.  :(

-- Don

--- "Larry V. Streepy, Jr." <[EMAIL PROTECTED]> wrote:
> All, I know this is question is more general than just ant, but it
> stems
> from the use of the javac and depend tasks.
> 
> I'm trying to add usage of the depend task to our current build
> system.
> I need it for the obvious reasons of not wanting to do a full clean
> and
> build in order to catch dependencies during recompile. 
> 
> Since the javac task only hands the list of filenames that have
> modified
> to the underlying compiler, the compiler can't do proper dependency
> analysis. Thus I'm working on the depend task.
> 
> Enough background, here's the problem.
> 
> I have an interface that defines constants (public static final).
> I have another class that uses those constants.
> 
> If I change one of the constants in the interface the depend task
> does
> not remove the class file for the dependent class.
> 
> After some digging, it appears that the compiler is removing the
> actual
> class member references and just embedding the constant directly into
> the generated class file.  This happens even with debug turned on and
> optimization turned off.  Even declaring them as non-final seems to
> have
> no effect.
> 
> Does anyone have ideas on how to fix, prevent, work around this?
> 
> -- 
> Larry V. Streepy, Jr.
> Chief Technical Officer and VP of Engineering
> 
> Health Language, Inc.  -- "We speak the language of healthcare"
> 
> 970/626-5028 (office)           mailto:[EMAIL PROTECTED]
> 970/626-4425 (fax)              http://www.healthlanguage.com


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Reply via email to