Hi,
Regarding #1: I agree with Cedric that WeakReference is a better tool for
writing "memory leak" tests. I've done it in the past, having gotten the
idea from a Sun blog ([a], which uses the code at [b]).
Regarding #2: It looks like the reify expression actually creates two
instances (in
I was bitten by this a year ago and posted here:
http://groups.google.com/group/clojure/browse_frm/thread/9091ad790fc96b24
My workaround is to call BigDecimal#stripTrailingZeros before passing
it to code that might compare it to some other number.
user> (== 1 (.stripTrailingZeros 1.0M))
true
How
Yes, that is one reason why I tend to use BigDecimal instead of float
or double. The thing that seems wrong to me is (not (== 1 1.0M)),
since these are both exact representations of the value one and the
doc for == says that it tests for "equivalent value (type-
independent)".
On Apr 11, 10:00 pm
Greetings,
I think that I've encountered a bug in ==.
user=> (and (== 1 1.0) (== 1.0 1.0M) (not (== 1 1.0M)))
true
This happens with 1.2.1 and 1.3-beta2. I think it has to do with the
precision of the BigDecimal.
user=> (== 1 1.0M)
false
user=> (== 1 1M)
true
I think a solution would be to us
Does the file you are evaluating have more than 65535 characters? As
far as I can tell, that is the maximum length of a String literal in
Java (see the CONSTANT_Utf8_info struct in
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html).
I've encountered that limit when using E