[ 
https://issues.apache.org/jira/browse/LUCENE-9394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17130600#comment-17130600
 ] 

Michael Sokolov commented on LUCENE-9394:
-----------------------------------------

So, I tinkered with changing the raw Map type used for ValueSource "context". 
If we change it to Map<?, ?> we can get rid of most warnings, but we still 
occasionally put things in the context map, and when we do that we have to 
unchecked cast it to something, so we get warnings for that. On the other hand, 
there would be no impact to callers.

To completely eliminate warnings in Lucene code related to this API, we could 
change the signature to Map<Object, Object>, which in fact is what we require, 
since we sometimes stick things in the context, and we also allow callers to 
put whatever they want in it? If we make that change, I think it would be more 
correct, but there would be more of a burden on users of the API who would now 
need to possibly change the generic Map types of context maps they create, or 
else  deal with unchecked casts of their own. Any opinions?

> Fix or suppress compile-time warnings
> -------------------------------------
>
>                 Key: LUCENE-9394
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9394
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael Sokolov
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is a spinoff from [~erickerickson]'s efforts over in  SOLR-10778 
> The goal is a warning-free compilation, followed by enforcement of build 
> failure on warnings, with the idea of suppressing innocuous warnings to the 
> extent that the remaining warnings be treated as build failure.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to