mrgordon/rotary — pull request #7 by DCWoods (2012-08-14 11:51:49+00:00)
Title: fixed get-value function so that get-item works with set-based attributes

The `get-item` function is failing with a `NullPointerException` when one of the return attributes is a set (number or string).

This can be traced to the `get-value` function, with the line:

(read-string (.getN attr-value))

When `attr-value` is a set, `.getN` returns `nil`, and `read-string` throws a `NullPointerException` when passed `nil`.

I changed this line to follow the syntax for the other lines in this function:

(if-let [v (.getN attr-value)] (read-string v))