dev@javaserverfaces.java.net

Revist jsf-tools/template-src/TypedCollections.java

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 11 Oct 2006 10:53:53 -0700

Hey All,

I wasn't thinking about performance when reviewing the change bundle
that included the addition of jsf-tools/template-src/TypedCollections.java.

This was added primarily to get around various cast compiler warnings
that became prevalent when we moved to 1.5.

My concern is that TypedCollections does an iteration through the collection
to ensure the types of said collection match the input arguments. If not
then throw a ClassCastException. This can potentially result in two
iterations
over the same collection.

Before this was in place, we would just let the ClassCastException happen
during iteration, so I suggest we go back to doing that and remove the type
validation logic from TypedCollections.

Thoughts?