NightOwl888 commented on code in PR #819:
URL: https://github.com/apache/lucenenet/pull/819#discussion_r1163152451


##########
src/Lucene.Net/Codecs/BlockTreeTermsReader.cs:
##########
@@ -86,7 +86,7 @@ namespace Lucene.Net.Codecs
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-    public class BlockTreeTermsReader : FieldsProducer
+    public class BlockTreeTermsReader<T> : FieldsProducer

Review Comment:
   Let's also add some docs to explain that this `TSubclassState` argument is 
so a subclass can set state. Specifically, it is for optional use when 
overriding the `ReadHeader()`, `ReadIndexHeader()` and `SeekDir()` methods. 
This only matters in the case where the state is required inside of any of 
those methods that is passed in to the subclass constructor.
   
   `new MyBlockTreeTermsReader(bool decideSomething)`
   
   Which can then be passed down in the constructor to 
`BlockTreeTermsReader<bool>`. The docs should be clear that this gets set to 
the protected field `m_subclassState` before any of the above methods are 
called where it is available for reading when overriding the above methods.
   
   If the user needs to pass more than one piece of data, they can create a 
class or struct to do so. All other virtual members of 
`BlockTreeTermsReader<TSubclassState>` are not called in the constructor, so 
the overrides of those methods won't specifically need to use this field 
(although they could for consistency).



##########
src/Lucene.Net/Codecs/BlockTreeTermsReader.cs:
##########
@@ -86,7 +86,7 @@ namespace Lucene.Net.Codecs
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-    public class BlockTreeTermsReader : FieldsProducer
+    public class BlockTreeTermsReader<T> : FieldsProducer

Review Comment:
   Let's make this more descriptive: `TSubclassState`.



##########
src/Lucene.Net/Codecs/BlockTreeTermsReader.cs:
##########
@@ -86,7 +86,7 @@ namespace Lucene.Net.Codecs
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-    public class BlockTreeTermsReader : FieldsProducer
+    public class BlockTreeTermsReader<T> : FieldsProducer

Review Comment:
   Looks like we have some XML doc comments that also need to be updated with 
the generic type to prevent warnings from happening. I am leaving this comment 
here, because it won't let me comment on the line where it is detected.



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to