You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/06/28 13:55:36 UTC

[GitHub] [solr] risdenk commented on a diff in pull request #922: SOLR-162680: toString is not required when crafting a string message

risdenk commented on code in PR #922:
URL: https://github.com/apache/solr/pull/922#discussion_r908511732


##########
solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java:
##########
@@ -461,7 +461,7 @@ public void testWhiteboxSolrDocumentConversion() {
             new SolrReturnFields(req("fl", allFieldNames + ",bogus1,bogus2,bogus3")))) {
 
       docOut = convertLuceneDocToSolrDoc(docIn, schema, rf);
-      final String debug = rf.toString() + " => " + docOut.toString();
+      final String debug = rf + " => " + docOut.toString();

Review Comment:
   `docOut.toString()` still needed?



##########
solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java:
##########
@@ -538,7 +538,7 @@ public void testJsonRangeFacetWithSubFacet() throws Exception {
 
       } catch (AssertionError | RuntimeException ae) {
         throw new AssertionError(
-            solrQuery.toString() + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);
+            solrQuery + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);

Review Comment:
   `rsp.toString()` still needed?



##########
solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java:
##########
@@ -239,7 +239,7 @@ public void testSimpleRangeFacetsOfSymmetricRates() throws Exception {
           }
         } catch (AssertionError | RuntimeException ae) {
           throw new AssertionError(
-              solrQuery.toString() + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);
+              solrQuery + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);

Review Comment:
   `rsp.toString()` still needed?



##########
solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java:
##########
@@ -615,7 +615,7 @@ public void testJsonRangeFacetAsSubFacet() throws Exception {
         }
       } catch (AssertionError | RuntimeException ae) {
         throw new AssertionError(
-            solrQuery.toString() + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);
+            solrQuery + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);

Review Comment:
   `rsp.toString()` still needed?



##########
solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java:
##########
@@ -435,7 +435,7 @@ public void testWhiteboxSolrDocumentConversion() {
             new SolrReturnFields(req("fl", "id,xxx:[geo f=store],uniq,foo_2_s1,subword")),
             new SolrReturnFields(req("fl", "id,xxx:subword,uniq,yyy:foo_2_s1,[geo f=store]")))) {
       docOut = convertLuceneDocToSolrDoc(docIn, schema, rf);
-      final String debug = rf.toString() + " => " + docOut.toString();
+      final String debug = rf + " => " + docOut.toString();

Review Comment:
   `docOut.toString()` still needed?



##########
solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java:
##########
@@ -181,7 +181,7 @@ public void testSimpleRangeFacetsOfSymmetricRates() throws Exception {
           }
         } catch (AssertionError | RuntimeException ae) {
           throw new AssertionError(
-              solrQuery.toString() + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);
+              solrQuery + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);

Review Comment:
   `rsp.toString()` still needed?



##########
solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java:
##########
@@ -306,7 +306,7 @@ public void testFacetRangeOfAsymmetricRates() throws Exception {
         }
       } catch (AssertionError | RuntimeException ae) {
         throw new AssertionError(
-            solrQuery.toString() + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);
+            solrQuery + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);

Review Comment:
   `rsp.toString()` still needed?



##########
solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java:
##########
@@ -365,7 +365,7 @@ public void testJsonFacetRangeOfAsymmetricRates() throws Exception {
         }
       } catch (AssertionError | RuntimeException ae) {
         throw new AssertionError(
-            solrQuery.toString() + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);
+            solrQuery + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);

Review Comment:
   `rsp.toString()` still needed?



##########
solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java:
##########
@@ -173,7 +173,7 @@ public void testInclude_Lower() throws Exception {
 
           } catch (AssertionError | RuntimeException ae) {
             throw new AssertionError(
-                solrQuery.toString() + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);
+                solrQuery + " -> " + rsp.toString() + " ===> " + ae.getMessage(), ae);

Review Comment:
   `rsp.toString()` still needed?



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