uschindler commented on code in PR #12296:
URL: https://github.com/apache/lucene/pull/12296#discussion_r1195218209


##########
lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java:
##########
@@ -22,27 +22,25 @@
  * A struct like class that represents a hierarchical relationship between 
{@link IndexReader}
  * instances.
  */
-public abstract class IndexReaderContext {
+public abstract sealed class IndexReaderContext permits 
CompositeReaderContext, LeafReaderContext {
   /** The reader context for this reader's immediate parent, or null if none */
   public final CompositeReaderContext parent;
   /**
-   * <code>true</code> if this context struct represents the top level reader 
within the
+   * {@code true} if this context struct represents the top level reader 
within the
    * hierarchical context
    */
   public final boolean isTopLevel;
-  /** the doc base for this reader in the parent, <code>0</code> if parent is 
null */
+  /** the doc base for this reader in the parent, {@code 0} if parent is null 
*/
   public final int docBaseInParent;
-  /** the ord for this reader in the parent, <code>0</code> if parent is null 
*/
+  /** the ord for this reader in the parent, {@code 0} if parent is null */
   public final int ordInParent;
 
   // An object that uniquely identifies this context without referencing
   // segments. The goal is to make it fine to have references to this
   // identity object, even after the index reader has been closed
-  final Object identity = new Object();
+  protected final Object identity = new Object();

Review Comment:
   I think this is an unrelated change. Do we need to make it protected?



-- 
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: issues-unsubscr...@lucene.apache.org

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


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

Reply via email to