Hi,

On Thu, Nov 23, 2000 at 06:06:12PM +1300, Bryce McKinlay wrote:
> I think it would be useful to have a java file somewhere that defines
> constants which can be used to enable/disable bits of java code at
> compile time. The serialized object dumping facility in
> ObjectInputStream, for example, currently adds a lot of overhead even
> when its turned off, because the java code makes calls into native code
> regardless of whether debugging is enabled or not. By setting a constant
> somewhere, the compiler can optimize it out when not doing a debug
> build.
Does it has to be a compile time constansts?
I would like to be able to have a class library where I could selectively
turn on/off some debugging code at runtime. If we used something like
System.getProperty("gnu.java.io.serialisation.debugging") to set these
constants (you can even do that in an interface) then at runtime the
user could do a -Dgnu.java.io.serialisation.debugging=yes to turn on
the debugging. (It should at least be an option to have these 'constants'
compiled in so they can be set dynamicly at runtime IMHO.)

Cheers,

Mark

_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to