dungba88 commented on code in PR #12624:
URL: https://github.com/apache/lucene/pull/12624#discussion_r1418919257


##########
lucene/core/src/java/org/apache/lucene/util/fst/FST.java:
##########
@@ -419,7 +418,8 @@ public FST(FSTMetadata<T> metadata, DataInput in, FSTStore 
fstStore) throws IOEx
 
   /** Create the FST with a metadata object and a FSTReader. */
   FST(FSTMetadata<T> metadata, FSTReader fstReader) {
-    this.metadata = metadata;
+    assert fstReader != null;

Review Comment:
   fstReader is not directly passed by users. If the users call the constructor 
with FSTStore, that cannot be null and it will throw an NPE due to the call 
`fstStore.init()`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to