tinkerpop/frames — pull request #18 by mikesname (2013-01-28 15:04:53+00:00)
Title: Allow the GremlinGroovy AnnotationHandler to deal with non-iterable return types.

I'm not sure if this has been mooted before, but it would be useful for me if the GremlinGroovy annotation worked for single item return types as well as Iterable.

Currently, if a non-iterable type is used the result is a ClassCastError. This patch adds a check for whether the annotated method returns an iterable, and if not, processes just the first item it finds.