ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 2811] <depend> does not work when static final primitive "constants" are modified
Date Sun, 22 Jan 2012 18:54:11 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=2811

Bruce Atherton <bruce@callenish.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #4 from Bruce Atherton <bruce@callenish.com> 2012-01-22 18:54:11 UTC ---
I agree with Stefan that this is a WONTFIX. The issue here is not sensibly
resolvable Ant, it is the javac compiler which inlines the static constant
values. This is a a known issue and has its own workaround: If you want your
static constant string NOT to be statically copied into your class files, use
the .intern() call. For example:

class MyClass {
    public static final String MyVal = "myvalue".intern();
    ...
}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message