Permalink
Browse files

Fixes #6

  • Loading branch information...
1 parent 87727df commit 7cf0a505ee8f6be3f4d303126e34b428b2830d7e @otabat committed Jul 8, 2014
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/couchbase_clj/client_builder.clj
@@ -1,6 +1,6 @@
(ns couchbase-clj.client-builder
(:import [java.net URI]
- [java.util Collection]
+ [java.util Collection ArrayList]
[java.util.concurrent TimeUnit]
[net.spy.memcached FailureMode DefaultHashAlgorithm]
[com.couchbase.client CouchbaseConnectionFactoryBuilder])
@@ -249,17 +249,18 @@
(let [bkt (or bucket @cb-config/default-bucket)
user (or username @cb-config/default-username)
pass (or password @cb-config/default-password)
- us (if uris
- (map str->uri uris)
- (map str->uri @cb-config/default-uris))
+ ^Collection coll-uris (if uris
+ (map str->uri uris)
+ (map str->uri @cb-config/default-uris))
+ list-uris (ArrayList. coll-uris)
failure-mode (or failure-mode :redistribute)
hash-alg (or hash-alg :native-hash)
opts (-> (dissoc opts :bucket :username :password :uris)
(assoc :failure-mode failure-mode
:hash-alg hash-alg))
builder (create-client-builder opts)]
(create-factory {:factory-builder (get-factory-builder builder)
- :uris us
+ :uris list-uris
:bucket bkt
:username user
:password pass})))

0 comments on commit 7cf0a50

Please sign in to comment.