projectwonder/wonder — pull request #110 by avendasora (2012-01-30 02:30:26+00:00)
Title: ERXPatcher fix for WOBrowser

Since Ramsey's change to allow exceptions to be thrown, there are times that a previously swallowed UnsupportedOperationException is now thrown because the code tries to call addAll on NSArray. Apparently the only time this happens is when the array of objects that is being passed to addAll is empty so swallowing the exception didn't cause problems.

This code does two things:

1) Handles the situation in which an NSArray is returned so that it simply initializes a new instance of NSArray with the contents of the array (even though it is empty).

2) Tries to eliminate an NSArray from every being returned in the first place. With this change, #1 really isn't needed, but if this change needs to be reverted, at least the change #1 will stop it from throwing an exception.