Ideally there would be some unit tests for this filter. But to enable that the filter would need to be defined separately, and I would agree that this is just a util filter which only might make sense internally, so having that as own class would only bloat the API.
Which possibly means we need to come up with support for internal API which the closure compiler then discards. Or find another way to test such in-line classes.

Hm, and the complete controllers are also not unit-tested ATM. That needs to change. Okay, so no requirement for this patch, we have to solve this in general before.