s1monw commented on a change in pull request #2212:
URL: https://github.com/apache/lucene-solr/pull/2212#discussion_r559179175
##########
File path: lucene/core/src/java/org/apache/lucene/index/LeafMetaData.java
##########
@@ -31,15 +31,19 @@
private final Sort sort;
/** Expert: Sole constructor. Public for use by custom {@link LeafReader}
impls. */
- public LeafMetaData(int createdVersionMajor, Version minVersion, Sort sort) {
+ public LeafMetaData(int createdVersionMajor, Version minVersion, int
minVersionSupported, Sort sort) {
this.createdVersionMajor = createdVersionMajor;
+ if (minVersionSupported > Version.LATEST.major || minVersionSupported < 0)
{
+ throw new IllegalArgumentException("minVersionSupported must be positive
and <= "
+ + Version.LATEST.major + " but was: " + minVersionSupported);
+ }
if (createdVersionMajor > Version.LATEST.major) {
throw new IllegalArgumentException(
"createdVersionMajor is in the future: " + createdVersionMajor);
}
- if (createdVersionMajor < 6) {
+ if (createdVersionMajor < minVersionSupported) {
throw new IllegalArgumentException(
- "createdVersionMajor must be >= 6, got: " + createdVersionMajor);
+ "createdVersionMajor must be >= " + minVersionSupported + ", got: "
+ createdVersionMajor);
Review comment:
I rolled this back. I really misread the logic. thanks for catching it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]