You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "epugh (via GitHub)" <gi...@apache.org> on 2026/07/23 18:47:02 UTC

[PR] Tidy up java code in o.a.s.jersey package [solr]

epugh opened a new pull request, #4658:
URL: https://github.com/apache/solr/pull/4658

   # Description
   
   Go through the o.a.s.jersey and look at intellji suggestions for code cleanups.
   
   # Solution
   
   IntelliJ inspired changes.
   
   # Tests
   
   existing tests plus claude review.
   


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Tidy up java code in o.a.s.jersey package [solr]

Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #4658:
URL: https://github.com/apache/solr/pull/4658#discussion_r3652410863


##########
solr/core/src/java/org/apache/solr/jersey/PostRequestLoggingFilter.java:
##########
@@ -173,7 +174,7 @@ public static String filterAndStringifyQueryParameters(
               if (!paramNamesToLog.contains(name)) return;
 
               for (String val : entry.getValue()) {
-                if (sb.length() != 0) sb.append('&');
+                if (!sb.isEmpty()) sb.append('&');

Review Comment:
   I think you are wrong...   



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Tidy up java code in o.a.s.jersey package [solr]

Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh merged PR #4658:
URL: https://github.com/apache/solr/pull/4658


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] Tidy up java code in o.a.s.jersey package [solr]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #4658:
URL: https://github.com/apache/solr/pull/4658#discussion_r3640574747


##########
solr/core/src/java/org/apache/solr/jersey/PostRequestLoggingFilter.java:
##########
@@ -173,7 +174,7 @@ public static String filterAndStringifyQueryParameters(
               if (!paramNamesToLog.contains(name)) return;
 
               for (String val : entry.getValue()) {
-                if (sb.length() != 0) sb.append('&');
+                if (!sb.isEmpty()) sb.append('&');

Review Comment:
   StringBuilder does not have an isEmpty() method, so this change will not compile. Use a length() check instead.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org