Skip to content

Commit

Permalink
Locked out nil haystacks to avoid NPEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcv committed Oct 11, 2009
1 parent ad14963 commit e0c836e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cupboard/utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@


(defn starts-with [#^String haystack #^String needle]
(.startsWith haystack needle))
(if-not (nil? haystack)
(.startsWith haystack needle)
false))


(defn flatten [x]
Expand Down

0 comments on commit e0c836e

Please sign in to comment.