Hey Lance,

It's best to talk about these things on the dev list so everyone can
participate.

There are times (like now) where I'm very busy and I don't have time
to read every message posted, much less respond to an action item that
doesn't directly affect me.

I'm not sure what you mean by validateForm so I can't comment on that.

The Comparable code has never been used by me, so it's certainly
possible it's broken.   From a quick glance, I can't see what you
changed.   But if there's a bug in validateCompareTo, please go ahead
and fix it :-)

---------- Forwarded message ----------
From: L Frohman <[EMAIL PROTECTED]>
Date: Aug 24, 2006 4:12 PM
Subject: fyi : compareToValidator
To: Mike Kienenberger <[EMAIL PROTECTED]>


I was adding a validator to the tomahawk sandbox, and I was looking at your
compareToValidator (and others) - to see how to do everything correctly.

I noticed that the sandbox is broken. "validateForm" was removed - I added
it back for my validator, and example_messages.properties was removed - I
added it with just the messages for my validator. Or were these files
specifically removed for a reason?

Also, I think you have a minor bug in compareToValidator.validate():

       else if ( (value instanceof Comparable) && (foreignValue instanceof
Comparable) )
       {
           . . .
       }
       else if (value instanceof Comparable)
       {
           throw new
ClassCastException(getClassCastExceptionMessage("value", Comparable.class,
value));
       }
       else if (foreignValue instanceof Comparable)
       {
           throw new
ClassCastException(getClassCastExceptionMessage("foreignValue",
Comparable.class, foreignValue));
       }

s/b

       else if ( (value instanceof Comparable) && (foreignValue instanceof
Comparable) )
       {
           . . .
       }
       else if (value instanceof Comparable)
       {
           throw new
ClassCastException(getClassCastExceptionMessage("foreignValue",
Comparable.class, foreignValue));
       }
       else if (foreignValue instanceof Comparable)
       {
           throw new ClassCastException(getClassCastExceptionMessage("value
", Comparable.class, value ));
       }



hope this helps,
Lance

Reply via email to