[kaffe] Patch: Merge of Classpath glue code for assertion framework
Benja Fallenstein
b.fallenstein@gmx.de
Sun May 11 09:55:01 2003
This is a multi-part message in MIME format.
--------------010905050908090809030408
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
today I had a problem with a dependency using log4j, because log4j would
try to use Class.desiredAssertionStatus() -- a 1.4 method that is part
of the assertion framework. Since the library I depended on initialized
log4j statically, my test suite wouldn't even start. To fix the problem,
I merged the corresponding GNU Classpath code into Kaffe-- not actually
implementing the whole assertion framework though, just the methods in
Class and ClassLoader :-)
I was hoping this could be useful for Kaffe?
- Benja
--------------010905050908090809030408
Content-Type: text/plain;
name="assert.patch"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="assert.patch"
PyBYT0VfMS4wCj8gWE9FXzEuMC50Z3oKPyBrZXYuYWx0Cj8gbGlicmFyaWVzL2NsaWIvYXd0
L3F0Ly5kZXBzCj8gbGlicmFyaWVzL2NsaWIvYXd0L3F0Ly5saWJzCj8gbGlicmFyaWVzL2Ns
aWIvYXd0L3F0L01ha2VmaWxlCj8gbGlicmFyaWVzL2NsaWIvYXd0L3F0L2NiZC5sbwo/IGxp
YnJhcmllcy9jbGliL2F3dC9xdC9jbHIubG8KPyBsaWJyYXJpZXMvY2xpYi9hd3QvcXQvZXZ0
LmxvCj8gbGlicmFyaWVzL2NsaWIvYXd0L3F0L2V2dC5tb2MuY2MKPyBsaWJyYXJpZXMvY2xp
Yi9hd3QvcXQvZXZ0Lm1vYy5sbwo/IGxpYnJhcmllcy9jbGliL2F3dC9xdC9mbnQubG8KPyBs
aWJyYXJpZXMvY2xpYi9hd3QvcXQvZ3JhLmxvCj8gbGlicmFyaWVzL2NsaWIvYXd0L3F0L2lt
Zy5sbwo/IGxpYnJhcmllcy9jbGliL2F3dC9xdC9saWJhd3QubGEKPyBsaWJyYXJpZXMvY2xp
Yi9hd3QvcXQvdGxrLmxvCj8gbGlicmFyaWVzL2NsaWIvYXd0L3F0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