ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: Why stop at JDK1.2? Only semi-serious question...
Date Mon, 15 Jul 2002 18:21:32 GMT
> Does anyone know if you can turn asserts on on the fly or 
> not? I think the
> programmatic interface would let you do that; with a JMX 
> wrapper you could
> manage assertions on a running system. That would be slick. 
> Mind you, I need
> a way of doing that for log4j too.

Yes, you can, using various classloader methods (setDefaultAssertionStatus, setPackageAssertionStatus,
setClassAssertionStatus and clearAssertionStatus). 

However, I don't believe that can affect classes which have already been loaded (unless it
uses some foul reflection and *assumes* the form that the compiler puts in).

Jon

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message