Comments below...
Ed Burns wrote:
>>>>>>On Sat, 02 Jul 2005 02:50:11 -0500, Jacob Hookom <jacob_at_hookom.net> said:
>>>>>>
>>>>>>JH> The test target needs to be run against Glassfish yet. Demo
>>>>>>JH> applications function fine
>>>>>>JH> with these modifications. Tested by adding a UIComponent to the tree
>>>>>>JH> which throws an
>>>>>>JH> exception if getChildren or getFacets is ever invoked on it.
>>>>>>
>>>>>>I'd like to get this in but I understand the problem with testing
>>>>>>against glassfish. Please hold until we can make sure the tests still
>>>>>>work.
>>>>>>
>>>>>>
I chatted with Carla at J1 on the need for 'user' documentation for
Glassfish. Jan said he had submitted some stuff to her, but I don't
have a clue as to how we can 'automate' testing against Glassfish when
we had targets working in webtier against Tomcat.
>>>>>>JH> + // For state saving
>>>>>>JH> + private final static Object[] EMPTY_ARRAY = new Object[0];
>>>>>>JH> +
>>>>>>JH> + // Empty iterator for short circuiting operations
>>>>>>JH> + private final static Iterator EMPTY_ITERATOR = new Iterator() {
>>>>>>JH> +
>>>>>>JH> + public void remove() {
>>>>>>JH> + throw new UnsupportedOperationException();
>>>>>>JH> + }
>>>>>>JH> +
>>>>>>JH> + public Object next() {
>>>>>>JH> + throw new NoSuchElementException("Empty Iterator");
>>>>>>JH> + }
>>>>>>JH> +
>>>>>>JH> + public boolean hasNext() {
>>>>>>JH> + return false;
>>>>>>JH> + }
>>>>>>JH> + };
>>>>>>
>>>>>>No need for this. Use java.util.Collections.EMPTY_LIST.iterator().
>>>>>>
>>>>>>
EMPTY_LIST.iterator() still creates an iterator instance every time,
actually an 'Itr' instance as dictated by java.util.AbstractList. While
a small optimization, there's not much to the code above-- let me know
if you still want it removed.
>>>>>>Otherwise, I concurr withd Adam's comments. Once you get my +1 on the
>>>>>>EG for getFacetCount(), you have r=edburns for going through the checkin
>>>>>>process (doing the tests and all).
>>>>>>
>>>>>>
Again, I need to probably spend a while figuring out how to get the
tests up and running against Glassfish. Are we just supposed to create
the test wars and drop them into Glassfish somewhere, then run the test
targets?
Thanks,
Jacob
>>>>>>Ed
>>>>>>
>>>>>>
>>>>>>
--
Jacob Hookom - Minneapolis
--------------------------
http://hookom.blogspot.com