-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SolrDedupServiceImpl: potential bug found in method cleanIndex #462
Comments
As far as I understand the code I would not say this is a bug. If there is an object in the index, which does not exist in the database, it's removed from the index. If it exists it should not be removed, as long as the index should not be erased completely. If it's expected to erase all of the index, this check is not needed at all and all objects should be unindexed (but I guess it does not make sense to erase the index by iterating through all objects). So I don't think this is a bug and would guess it's intended as it is. |
@olli-gold , thanks. That makes sense. I'll close the issue as won't fix. |
@olli-gold , I have to reopen this issue. If DSpace/dspace-api/src/main/java/org/dspace/app/deduplication/service/impl/SolrDedupServiceImpl.java Line 642 in 04c7aa6
the Finally, this will result in a NullPointerException in DSpace/dspace-api/src/main/java/org/dspace/app/deduplication/service/impl/SolrDedupServiceImpl.java Line 533 in 04c7aa6
because of null object access in |
Oh, yes, you are right. This is obviously a bug, which needs to be fixed. |
Bug Description
We found a potential bug in method
cleanIndex
:DSpace/dspace-api/src/main/java/org/dspace/app/deduplication/service/impl/SolrDedupServiceImpl.java
Line 637 in 04c7aa6
Should this check be modified to
i != null
?The text was updated successfully, but these errors were encountered: