Apache Solr open-source search software
SOLR-13671 Allow 'var' keyword in Java sources (#366)
Jan Høydahle6860240d23a
diff --git a/gradle/validation/validate-source-patterns.gradle b/gradle/validation/validate-source-patterns.gradleindex f9639d0e00c..13795c625bd 100644--- a/gradle/validation/validate-source-patterns.gradle+++ b/gradle/validation/validate-source-patterns.gradle@@ -121,7 +121,6 @@ configure(rootProject) {// default excludes.exclude '**/build/**'exclude '**/.idea/**'- exclude 'dev-tools/solr-missing-doclet/src/**/*.java' // <-- TODO: remove once we allow "var" on master// ourselves :-)exclude 'gradle/validation/validate-source-patterns.gradle'@@ -161,10 +160,8 @@ class ValidateSourcePatternsTask extends DefaultTask {(~$/import java\.lang\.\w+;/$) : 'java.lang import is unnecessary']- // Python and others merrily use var declarations, this is a problem _only_ in Java at least for 8x where we're forbidding var declarationsdef invalidJavaOnlyPatterns = [(~$/\n\s*var\s+.*=.*<>.*/$) : 'Diamond operators should not be used with var',- (~$/\n\s*var\s+/$) : 'var is not allowed in until we stop development on the 8x code line']def found = 0;diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex e94610a897b..2a103bd77c0 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -167,6 +167,8 @@ Build* LUCENE-10104, SOLR-15631: Upgrade forbiddenapis to version 3.2. (Uwe Schindler)+* SOLR-13671: Remove check for bare "var" declarations in validate-source-patterns (Erick Erickson, Alex Bulygin, janhoy)+Other Changes----------------------* SOLR-15603: Add an option to activate Gradle build cache, build task cleanups (Alexis Tual, Dawid Weiss)diff --git a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc b/solr/solr-ref-guide/src/major-changes-in-solr-9.adocindex 43190949b70..a9d2c6e608b 100644--- a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc+++ b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc@@ -39,6 +39,8 @@ _(raw; not yet edited)_* LUCENE-8738: Move to Java 11 as minimum Java version.(Adrien Grand, Uwe Schindler)+* SOLR-13671: Allow 'var' keyword in Java sources+* SOLR-12055 introduces async logging by default. There's a small window where log messages may be lostin the event of some hard crash. Switch back to synchronous logging if this is unacceptable, seesee comments in the log4j2 configuration files (log4j2.xml by default).