Permalink
Browse files

stop causing NPE when no keywords are present

  • Loading branch information...
1 parent d58ba74 commit 50dea91946a3eef7257b3cb5ba2d4942514f3bb3 @cap10morgan cap10morgan committed Oct 1, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/camelot/metadata.clj
View
@@ -12,7 +12,9 @@
{:author (.getAuthor info)
:title (.getTitle info)
:subject (.getSubject info)
- :keywords (str/split (.getKeywords info) #", ")
+ :keywords (if-let [keywords (.getKeywords info)]
+ (string/split keywords #", ")
+ [])
:trapped (.getTrapped info)
:creator (.getCreator info)
:pages (.getNumberOfPages doc)

0 comments on commit 50dea91

Please sign in to comment.