malliaridis commented on code in PR #2706: URL: https://github.com/apache/solr/pull/2706#discussion_r1836144609
########## solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessorFactory.java: ########## @@ -92,8 +92,7 @@ public void init(final NamedList<?> args) { String algorithmString = params.get(ALGORITHM_PARAM); Algorithm classificationAlgorithm; try { - if (algorithmString == null - || Algorithm.valueOf(algorithmString.toUpperCase(Locale.ROOT)) == null) { Review Comment: Thanks for noticing. The root cause of these specfic changes is the project-wide version alignment of errorprone annotations. Our project is currently configured to use error-prone annotations `2.23.0`, but some modules upgrade it to `2.28.0` through transitive dependencies, resulting in inconsistent versions across the project. The checksum in main of error-prone annotations is from the version 2.28.0. When upgrading the version to 2.28.0 and enabling error-prone during `gradlew check`, it complains on all these unrelated changes. The main dependencies that affect this version alignment / upgrade are listed in `dependencies.gradle`: ```gradle handler.add(conf.name, libs.google.errorprone.annotations, { because "transitive version alignment for consistency across project" + "\n- ${getFullName(libs.google.guava)} uses 2.26.1" + "\n- ${getFullName(libs.google.gson)} uses 2.27.0" + "\n- ${getFullName(libs.benmanes.caffeine)} uses 2.28.0" }) ``` Since the highest version occurrence is 2.28.0, error-prone annotations is upgraded to that version. This does also align correctly with the checksum currently present. A similar situation applies to Apache kerby, that is updated from 1.0.1 to 2.0.3, and Google guava that is updated from 32.1.3-jre to 33.1.0-jre. These three updates could be addressed in their corresponding PRs (see https://github.com/apache/solr/pull/2167, https://github.com/apache/solr/pull/1612 and https://github.com/apache/solr/pull/2169), but error-prone annotations is already at 2.35.1 and more work needs to be done to resolve them (eventually by also resolving any transitive dependencies first). These changes could be addressed in the other PRs and we can delay a bit longer this one. However, error-prone may require more work than usual, as it requires an intermediate update to 2.31.0 (because of JDK support), checks and changes in both main and branch_9x for backporting, and then a final upgrade to 2.35.1 (latest version). P.S. I've added the error shown by error-prone (2.28.0). For this one it would be: > error: [ImpossibleNullComparison] This value cannot be null, and comparing it to null may be misleading. -- 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...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org