   (condp instance? primitive
     String
     (let [encoder (.newEncoder (Charset/forName "UTF-8"))]
-      (.encode encoder (CharBuffer/wrap primitive)))
+      (.encode encoder (CharBuffer/wrap ^String primitive)))
 
     (Class/forName "[B")
     (ByteBuffer/wrap primitive)

        result (QueryProcessor/processPrepared pp-query consistency query-state
                                               (map ->bytebuffer args))]
    (when (instance? ResultMessage$Rows result)
      (UntypedResultSet. (.result result)))))


;;; Session Cassandra definitions.


(defn- read-session-data
  [key]
  (when-let [^UntypedResultSet data (do-prepared (deref read-query) session-consistency key)]
    (when-not (.isEmpty data)
      (-> (.. data one (getBytes "data") slice)
          bytebuffer->bytes
