Subject: | |
From: | |
Reply To: | |
Date: | Mon, 5 Dec 2011 11:36:33 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Dec 5, 2011, at 9:26 AM, Richard O. Legendi wrote:
> I downloaded the latest source of MASON and made some minor modifications on the code (some errors caused by typos, created but not thrown exceptions, some NPEs, corrected error messages and alike).
Thanks for these, Richard! There are a few that I disagreed with, but all in all a solid collection of bugfixes, I've committed nearly all of them. See below for responses. For future bug fixes, feel free to mail me directly.
Sean
- this.indexTo = indexTo;
Fixed.
- if compareTo() returns 0 then equals() should return true as well
I'm bleary-eyed this morning (spent all night up with kids) but this is, I think, another example of surprisingly bad reasoning on Sun's part. compareTo is largely used for sorting. equals is largely used for hashing. Edges are not unique: they must hash by pointer, but we *always* want to compare them by value for sorting.
- if (obj instanceof Key)
Agreed, a good safety fix.
- if (min==max)
I think changing that from an elseif breaks the logScale check below it for min > max.
- this.frameRate = frameRate
Fixed.
- public int compareTo(Object o) // See comment for sim.field.network.Edge
In this case I think I'd prefer that sleeping dogs lie: this is a private object.
- import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
I did a few tweaks of the imports. Note that MASON traditionally uses * rather than enumerating every single import: we code much of this by hand, not using Eclipse, and enumeration is extraordinarily painful.
- super.setName(val);
Fixed.
- target.printStackTrace(stream);
Fixed.
- if (lambda <= 0.0) throw new IllegalArgumentException();
Fixed.
- private static final long serialVersionUID = 1;
Fixed in a different way already.
- static final long serialVersionUID = 9115981605874680023L;
Fixed already.
- private static final long serialVersionUID = 1;
Actually the issue is that KMeansEngine is not Serializable (it should have been)
- Boolean[] usable;
Fixed (I think). Now creating new Boolean values rather than using the standard constants.
- !scaledFont.getFamily().equals(labelFont.getFamily())
Updated for clarity. But in fact the original works: strings are hashed constants.
|
|
|