dsmiley commented on code in PR #2497:
URL: https://github.com/apache/solr/pull/2497#discussion_r1626476316


##########
solr/core/src/test/org/apache/solr/cli/PostToolTest.java:
##########
@@ -210,6 +211,7 @@ public void testAppendParam() {
   }
 
   @Test
+  @SuppressForbidden(reason = "java.net.URL ctors deprecated since Java 20")

Review Comment:
   can this be put at the class level once instead of most tests?



##########
solr/core/src/java/org/apache/solr/cli/PostTool.java:
##########
@@ -256,10 +257,12 @@ public void runImpl(CommandLine cli) throws Exception {
     solrUpdateUrl = null;
     if (cli.hasOption("url")) {
       String url = cli.getOptionValue("url");
-      solrUpdateUrl = new URL(url);
+      URI uri = new URI(url);

Review Comment:
   nitpick: inline



##########
solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java:
##########
@@ -844,7 +844,8 @@ public void doTestIndexFetchWithLeaderUrl() throws 
Exception {
             + "/"
             + DEFAULT_TEST_CORENAME
             + ReplicationHandler.PATH;
-    URL url = new URL(leaderUrl);
+    URI uri = new URI(leaderUrl);
+    URL url = uri.toURL();

Review Comment:
   inline to one-liner



##########
gradle/validation/dependency-analyze.gradle:
##########
@@ -23,14 +23,14 @@ allprojects { prj ->
     prj.apply plugin: 'ca.cutterslade.analyze'
 
     analyzeClassesDependencies {
-      warnUsedUndeclared = false // means fail build if UsedUndeclared found
-      warnUnusedDeclared = false // means fail build if UnusedDeclared found
+      warnUsedUndeclared = true // means fail build if UsedUndeclared found

Review Comment:
   you updated booleans but not the explanatory comment.  Why change this any 
way?



##########
solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java:
##########
@@ -86,7 +86,7 @@
  *
  * @since 1.4
  */
[email protected]
+// @LuceneTestCase.Nightly

Review Comment:
   Why?



##########
solr/core/src/test/org/apache/solr/response/transform/TestSubQueryTransformerDistrib.java:
##########
@@ -134,6 +135,7 @@ public static void setupCluster() throws Exception {
   }
 
   @SuppressWarnings("serial")
+  @SuppressForbidden(reason = "java.net.URL ctors deprecated since Java 20")

Review Comment:
   You fix some and suppress others.  Is there a pattern/approach to it?  (just 
curious; maybe not)



-- 
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