You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/12/18 16:40:08 UTC
[GitHub] [lucene-solr] uschindler commented on pull request #2052: LUCENE-8982: Make NativeUnixDirectory pure java with FileChannel direct IO flag, and rename to DirectIODirectory
uschindler commented on pull request #2052:
URL: https://github.com/apache/lucene-solr/pull/2052#issuecomment-748195186
Hi,
with the warning I can't really help much, I can only recommend to call out to
IMHO, instead of adding `@SuppressWarnings`, you should also review the Gradle config, if there are some `-Xlint`options enabled that cause this. I was warning the people who added "fail on err / Werror" already that this should only ever be done if you explicitely use a positive list of warnings you want to suppress.
If nothing helps, I'd use the following workaround - it's a simple enum:
- lookup the class with `Class#forName()`
- lookup the enum constant using the class API, cast to interface OpenOption, and assign it to a final static constant in the DirectIODirectory class
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org