Good idea, Hoss. Mikhail, we can use the @SuppressForbidden annotation on that method to allow it in this one case.
Alan Woodward www.flax.co.uk > On 18 Oct 2016, at 05:16, Mikhail Khludnev <[email protected]> wrote: > > If we do that, how the following will be possible: > > org.apache.solr.client.solrj.impl.SolrHttpClientContextBuilder.createContext(Object) > > public HttpClientContext createContext(Object userToken) { > HttpClientContext context = new HttpClientContext(); > > On Tue, Oct 18, 2016 at 2:48 AM, Chris Hostetter <[email protected] > <mailto:[email protected]>> wrote: > > Alan & Mikhail... > > Should we add HttpClientContext's constructor to forbidden APIs list and > force internal code to use the helper APIs to prevent (test) bugs like > this in the future? > > > > : Date: Mon, 10 Oct 2016 09:22:51 +0000 (UTC) > : From: [email protected] <mailto:[email protected]> > : Reply-To: [email protected] <mailto:[email protected]> > : To: [email protected] <mailto:[email protected]> > : Subject: lucene-solr:master: SOLR-9614: fixing TestSolrCloudWithKerberosAlt > : > : Repository: lucene-solr > : Updated Branches: > : refs/heads/master d8bb56d4a -> 9fea5129d > : > : > : SOLR-9614: fixing TestSolrCloudWithKerberosAlt > : > : Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo > <http://git-wip-us.apache.org/repos/asf/lucene-solr/repo> > : Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9fea5129 > <http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9fea5129> > : Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9fea5129 > <http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9fea5129> > : Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9fea5129 > <http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9fea5129> > : > : Branch: refs/heads/master > : Commit: 9fea5129d3eaef7cdc8086271677fc807ca1c020 > : Parents: d8bb56d > : Author: Mikhail Khludnev <[email protected] <mailto:[email protected]>> > : Authored: Mon Oct 10 12:18:54 2016 +0300 > : Committer: Mikhail Khludnev <[email protected] <mailto:[email protected]>> > : Committed: Mon Oct 10 12:20:58 2016 +0300 > : > : ---------------------------------------------------------------------- > : .../java/org/apache/solr/client/solrj/impl/HttpClientUtil.java | 3 +-- > : 1 file changed, 1 insertion(+), 2 deletions(-) > : ---------------------------------------------------------------------- > : > : > : > http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fea5129/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java > > <http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fea5129/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java> > : ---------------------------------------------------------------------- > : diff --git > a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java > b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java > : index ed285d1..d4dea17 100644 > : --- > a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java > : +++ > b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java > : @@ -406,9 +406,8 @@ public class HttpClientUtil { > : * in connection pools if client authentication is enabled. > : */ > : public static HttpClientContext createNewHttpClientRequestContext() { > : - HttpClientContext context = new HttpClientContext(); > : + HttpClientContext context = > httpClientRequestContextBuilder.createContext(HttpSolrClient.cacheKey); > : > : - context.setUserToken(HttpSolrClient.cacheKey); > : return context; > : } > : > : > : > > -Hoss > http://www.lucidworks.com/ <http://www.lucidworks.com/> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > <mailto:[email protected]> > For additional commands, e-mail: [email protected] > <mailto:[email protected]> > > > > > -- > Sincerely yours > Mikhail Khludnev
