Clearer error message if Codec loading fails under a Security Manager
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
### Description
I just spent quite a while tracking down a problem wherein a SecurityManager was silently ignoring the META-INF/services/org.apache.lucene.codecs.Codec file. We should enhance the message in the event that a security manager is detected to alert the user to this possibility and the potentially surprising detail that no SecurityException is thrown by java when it fails to load a file via the classpath. Even more confusingly, java can load classes and then silently fail to load files from the same jar file that the class came from, so alerting the user to this complex situation seems worthwhile. (PR soon)
Contributor guide
Research direction
Start at Lucene's Codec loading path and inspect how failures involving META-INF/services/org.apache.lucene.codecs.Codec are reported when a SecurityManager is present. Update the error message to explain the possible silent classpath resource failure and the absence of a SecurityException; done means the message clearly alerts users to this situation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100