You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by imgpulak <gi...@git.apache.org> on 2017/12/06 06:48:04 UTC
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
GitHub user imgpulak opened a pull request:
https://github.com/apache/lucene-solr/pull/286
[LUCENE-8075] Possible null pointer dereference in core/src/java/org/…
…apache/lucene/codecs/blocktree/IntersectTermsEnum.java
Fix it
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/imgpulak/lucene-solr LUCENE-8075_2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/286.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 #286
----
commit 132d377474e52bebeaaabe71543930684ea6fb95
Author: PG <pg...@pulakghosh.local>
Date: 2017-12-06T06:47:05Z
[LUCENE-8075] Possible null pointer dereference in core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java
Fix it
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/lucene-solr/pull/286
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by imgpulak <gi...@git.apache.org>.
Github user imgpulak commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155178451
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
@jpountz Do we not need to make -
fstReader = null;
?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by imgpulak <gi...@git.apache.org>.
Github user imgpulak commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155930642
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
@jpountz, @mikemccand any update here?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by mikemccand <gi...@git.apache.org>.
Github user mikemccand commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r156538059
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
Sorry for the slow respons ehere @imgpulak and @jpountz but Adrien is right: `fr.index` can never be null anymore. So I think we should change the code to `assert` it's never null and only do the `else` clause of the current `if` statement?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by jpountz <gi...@git.apache.org>.
Github user jpountz commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155295185
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
This is why I pinged @mikemccand to know whether the fact that the index is always loaded is accidental or desired.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr issue #286: [LUCENE-8075] Possible null pointer dereference in c...
Posted by imgpulak <gi...@git.apache.org>.
Github user imgpulak commented on the issue:
https://github.com/apache/lucene-solr/pull/286
@ jpountz @mikemccand I have updated as per your comment. Please review the same.
Thanks !
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by imgpulak <gi...@git.apache.org>.
Github user imgpulak commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155607967
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
@jpountz Any update here?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by imgpulak <gi...@git.apache.org>.
Github user imgpulak commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155304417
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
Thanks. That works for me.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by jpountz <gi...@git.apache.org>.
Github user jpountz commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155291224
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
My point was that it seems that fr.index can never be null. So we will never enter this branch.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by imgpulak <gi...@git.apache.org>.
Github user imgpulak commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155296495
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
Okay. Now I understand. Thanks! Let me know what we are going to do. I will make changes accordingly.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by jpountz <gi...@git.apache.org>.
Github user jpountz commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155303664
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
All documentation is in javadocs, we don't have other documentation.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by imgpulak <gi...@git.apache.org>.
Github user imgpulak commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155292700
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
Okay. In that case shall we that piece of code? @jpountz
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...
Posted by imgpulak <gi...@git.apache.org>.
Github user imgpulak commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/286#discussion_r155300117
--- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
@@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
if (fr.index == null) {
fstReader = null;
--- End diff --
Hi @jpountz,
May I get the design documents of Lucene?
Thanks,
Pulak
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[GitHub] lucene-solr issue #286: [LUCENE-8075] Possible null pointer dereference in c...
Posted by jpountz <gi...@git.apache.org>.
Github user jpountz commented on the issue:
https://github.com/apache/lucene-solr/pull/286
Actually I wonder that we should instead remove the `if (fr.index == null)` branch. @mikemccand We do not seem to use the ability to skip the load of the terms index anymore?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org