Hi *, 
I have a general question about using Optional instead of a raw null:
I have noticed that some functions in Solr are dealing with input parameters 
that might be null, these parameters might be wrapped into Optional - to avoid 
forgetting that they might be nulls and also to make clear that they are.. 
optional. 

For example in marshalOrUnmarshalSortValue 
https://github.com/apache/lucene-solr/blob/1d85cd783863f75cea133fb9c452302214165a4d/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/ShardResultTransformerUtils.java#L37

both originalSortValue and schemaField are optional, and we might declare them 
Optional. 
any opinion? 

Cheers,
Diego

Reply via email to