@ Override public void setParameters ( Parameters parameters ) { final LiveQuery liveQuery ; synchronized ( lock ) { this . parameters = parameters != null ? parameters . readonlyCopy ( ) : null ; liveQuery = this . query ; } // https://github.com/couchbase/couchbase-lite-android/issues/1727 // Shouldn't call start() method inside the lock to prevent deadlock: if ( liveQuery != null ) { liveQuery . start ( ) ; } }
Set parameters should copy the given parameters . Set a new parameter will also re - execute the query if there is at least one listener listening for changes .