 ;; Chunk size for path insertion to avoid blowing prepared statement size limit
 (def path-insertion-chunk-size 6000)
 
-(defn pathmap-digestor [digest]
+(defn pathmap-digestor [^MessageDigest digest]
   (fn [{:keys [path value_type_id] :as pathmap}]
     (.update digest (-> (str path value_type_id)
                         (.getBytes "UTF-8")))


      ;; Only update the paths if any existing paths_hash doesn't
      ;; match the incoming paths.
      (let [paths-hash (if-let [existing-hash (factset-paths-hash factset_id)]
                         (let [incoming-hash (-> (facts/facts->pathmaps values)
                                                 hash-pathmaps-paths)]
                           (if (Arrays/equals existing-hash incoming-hash)
                             existing-hash

          current-volatile-fact-keys (volatile-fact-keys-for-factset factset_id)
          incoming-volatile-facts (select-keys values current-volatile-fact-keys)
          incoming-stable-facts (apply dissoc values current-volatile-fact-keys)
          ^bytes incoming-stable-fact-hash (shash/generic-identity-sha1-bytes incoming-stable-facts)
          fact-json-updates (if-not (Arrays/equals stable_hash incoming-stable-fact-hash)
                              ;; stable facts are different; load the json and move the ones that
                              ;; changed into volatile
