[jira] [Commented] (SOLR-7765) TokenizerChain without char filters cause NPE in luke request handler

2015-07-21 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14635385#comment-14635385
 ] 

ASF subversion and git services commented on SOLR-7765:
---

Commit 1692170 from hoss...@apache.org in branch 'dev/trunk'
[ https://svn.apache.org/r1692170 ]

SOLR-7765: Hardened the behavior of TokenizerChain when null arguments are used 
in constructor. This prevents NPEs in some code paths.

 TokenizerChain without char filters cause NPE in luke request handler
 -

 Key: SOLR-7765
 URL: https://issues.apache.org/jira/browse/SOLR-7765
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.2.1
Reporter: Konstantin Gribov
Assignee: Hoss Man
Priority: Minor
 Attachments: SOLR-7765.patch, SOLR-7765.patch, SOLR-7765.patch


 {{TokenizerChain}} created using 2-arg constructor has {{null}} in 
 {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.
 Will create PR in a couple of minutes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7765) TokenizerChain without char filters cause NPE in luke request handler

2015-07-21 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14635438#comment-14635438
 ] 

ASF subversion and git services commented on SOLR-7765:
---

Commit 1692174 from hoss...@apache.org in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1692174 ]

SOLR-7765: Hardened the behavior of TokenizerChain when null arguments are used 
in constructor. This prevents NPEs in some code paths. (merge r1692170)

 TokenizerChain without char filters cause NPE in luke request handler
 -

 Key: SOLR-7765
 URL: https://issues.apache.org/jira/browse/SOLR-7765
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.2.1
Reporter: Konstantin Gribov
Assignee: Hoss Man
Priority: Minor
 Attachments: SOLR-7765.patch, SOLR-7765.patch, SOLR-7765.patch


 {{TokenizerChain}} created using 2-arg constructor has {{null}} in 
 {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.
 Will create PR in a couple of minutes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7765) TokenizerChain without char filters cause NPE in luke request handler

2015-07-21 Thread Konstantin Gribov (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14635043#comment-14635043
 ] 

Konstantin Gribov commented on SOLR-7765:
-

Fixing this in {{TokenizerChain}} itself seems better to me. 

Is there any reason to use reversed order in ifs (like {{if (0  
cfiltfacs.length)}})? It looks quite strange since most of lucene  solr code 
use more usual {{if (var  0)}} style.

 TokenizerChain without char filters cause NPE in luke request handler
 -

 Key: SOLR-7765
 URL: https://issues.apache.org/jira/browse/SOLR-7765
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.2.1
Reporter: Konstantin Gribov
Assignee: Hoss Man
Priority: Minor
 Attachments: SOLR-7765.patch, SOLR-7765.patch, SOLR-7765.patch


 {{TokenizerChain}} created using 2-arg constructor has {{null}} in 
 {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.
 Will create PR in a couple of minutes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7765) TokenizerChain without char filters cause NPE in luke request handler

2015-07-15 Thread Konstantin Gribov (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14628258#comment-14628258
 ] 

Konstantin Gribov commented on SOLR-7765:
-

Updated PR with test case

 TokenizerChain without char filters cause NPE in luke request handler
 -

 Key: SOLR-7765
 URL: https://issues.apache.org/jira/browse/SOLR-7765
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.2.1
Reporter: Konstantin Gribov
Assignee: Hoss Man
Priority: Minor
 Attachments: SOLR-7765.patch


 {{TokenizerChain}} created using 2-arg constructor has {{null}} in 
 {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.
 Will create PR in a couple of minutes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7765) TokenizerChain without char filters cause NPE in luke request handler

2015-07-15 Thread Konstantin Gribov (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14628046#comment-14628046
 ] 

Konstantin Gribov commented on SOLR-7765:
-

I am not familiar with lucene-solr test suite. It seems that {{TokenizerChain}} 
was created standard way from schema (via {{FieldTypePluginLoader}}, line 
403@lucene_solr_5_2_1), so it was created with 
{code:java}
new TokenizerChain(charFilters.toArray(new 
CharFilterFactory[charFilters.size()]), tokenizers.get(0), filters.toArray(new 
TokenFilterFactory[filters.size()]));
{code} 
which is three-arg constructor with non-null first argument (it will be empty 
array when {{charFilters}} is empty).

I'll add a test to my PR.

 TokenizerChain without char filters cause NPE in luke request handler
 -

 Key: SOLR-7765
 URL: https://issues.apache.org/jira/browse/SOLR-7765
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.2.1
Reporter: Konstantin Gribov
Assignee: Hoss Man
Priority: Minor
 Attachments: SOLR-7765.patch


 {{TokenizerChain}} created using 2-arg constructor has {{null}} in 
 {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.
 Will create PR in a couple of minutes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7765) TokenizerChain without char filters cause NPE in luke request handler

2015-07-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618905#comment-14618905
 ] 

ASF GitHub Bot commented on SOLR-7765:
--

GitHub user grossws opened a pull request:

https://github.com/apache/lucene-solr/pull/185

Fix NPE in LukeRequestHandler in getAnalyzerInfo

NPE in thrown when luke tries to iterate 
`TokenizerChain#getCharFilterFactories()`
which is null if 2-arg `TokenizerChain` constructor is used.

Fixes SOLR-7765

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/grossws/lucene-solr fix-solr-7765

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/lucene-solr/pull/185.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #185


commit 7a0f08915e73f0ef28d4b9af8bd613612ca39946
Author: Konstantin Gribov gros...@gmail.com
Date:   2015-07-08T16:30:04Z

Fix NPE in LukeRequestHandler in getAnalyzerInfo

NPE in thrown when luke tries to iterate 
`TokenizerChain#getCharFilterFactories()`
which is null if 2-arg `TokenizerChain` constructor is used.

Fixes SOLR-7765




 TokenizerChain without char filters cause NPE in luke request handler
 -

 Key: SOLR-7765
 URL: https://issues.apache.org/jira/browse/SOLR-7765
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.2.1
Reporter: Konstantin Gribov
Priority: Minor

 {{TokenizerChain}} created using 2-arg constructor has {{null}} in 
 {{charFilters}}, so {{LukeRequestHandler}} throws NPE on iterating it.
 Will create PR in a couple of minutes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org