sonatype-lift[bot] commented on code in PR #1307:
URL: https://github.com/apache/solr/pull/1307#discussion_r1083884573


##########
solr/core/src/java/org/apache/solr/handler/export/MultiFieldWriter.java:
##########
@@ -101,35 +110,35 @@ public boolean write(SortDoc sortDoc, LeafReaderContext 
readerContext, MapWriter
 
       final SortedSetDocValues docVals = vals;
 
-      out.put(this.field,
-          (IteratorWriter) w -> {
-            long o;
-            while((o = docVals.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
-              BytesRef ref = docVals.lookupOrd(o);
-              fieldType.indexedToReadable(ref, cref);
-              IndexableField f = fieldType.createField(schemaField, 
cref.toString());
-              if (f == null) w.add(cref.toString());
-              else w.add(fieldType.toObject(f));
-            }
-          });
+      out.put(
+          this.field,
+          (IteratorWriter)
+              w -> {
+                long o;
+                while ((o = docVals.nextOrd()) != 
SortedSetDocValues.NO_MORE_ORDS) {
+                  BytesRef ref = docVals.lookupOrd(o);
+                  fieldType.indexedToReadable(ref, cref);
+                  IndexableField f = fieldType.createField(schemaField, 
cref.toString());
+                  if (f == null) w.add(cref.toString());
+                  else w.add(fieldType.toObject(f));
+                }
+              });
       return true;
     }
-
   }
 
-
   static LongFunction<Object> bitsToValue(FieldType fieldType) {
     switch (fieldType.getNumberType()) {

Review Comment:
   đŸ’Ŧ 3 similar findings have been found in this PR
   
   ---
   
   *NULLPTR_DEREFERENCE:*  ``NumberType FieldType.getNumberType()`` could be 
null (from the call to `FieldType.getNumberType()` on line 131) and is 
dereferenced.
   
   ---
   
   <details><summary><b>🔎 Expand here to view all instances of this 
finding</b></summary><br/>
     
     
   <div align=\"center\">
   
   
   | **File Path** | **Line Number** |
   | ------------- | ------------- |
   | solr/core/src/java/org/apache/solr/search/facet/DocValuesAcc.java | 
[175](https://github.com/apache/solr/blob/a33ba6bb6cf2e46fb136f879a6bc5696b8f779d8/solr/core/src/java/org/apache/solr/search/facet/DocValuesAcc.java#L175)
 |
   | solr/core/src/java/org/apache/solr/search/facet/PercentileAgg.java | 
[328](https://github.com/apache/solr/blob/a33ba6bb6cf2e46fb136f879a6bc5696b8f779d8/solr/core/src/java/org/apache/solr/search/facet/PercentileAgg.java#L328)
 |
   | 
solr/solrj/src/java/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparator.java
 | 
[113](https://github.com/apache/solr/blob/a33ba6bb6cf2e46fb136f879a6bc5696b8f779d8/solr/solrj/src/java/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparator.java#L113)
 |
   <p><a 
href="https://lift.sonatype.com/results/github.com/apache/solr/01GQEZBSKB0V8KWDB2MGK5EH8N?t=Infer|NULLPTR_DEREFERENCE"
 target="_blank">Visit the Lift Web Console</a> to find more details in your 
report.</p></div></details>
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=371756324&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=371756324&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=371756324&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=371756324&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=371756324&lift_comment_rating=5)
 ]



##########
solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java:
##########
@@ -747,8 +782,11 @@ private void remoteQuery(String coreUrl, 
HttpServletResponse resp) throws IOExce
 
       if (httpEntity != null) {
         if (httpEntity.getContentEncoding() != null)
-          resp.setHeader(httpEntity.getContentEncoding().getName(), 
httpEntity.getContentEncoding().getValue());
-        if (httpEntity.getContentType() != null) 
resp.setContentType(httpEntity.getContentType().getValue());
+          resp.setHeader(

Review Comment:
   <picture><img alt="0% of developers fix this issue" 
src="https://lift.sonatype.com/api/commentimage/fixrate/0/display.svg";></picture>
   
   đŸ’Ŧ 3 similar findings have been found in this PR
   
   ---
   
   *CROSS_SITE_SCRIPTING:*  
UserControlledString(HttpServletRequest.getHeader(...)) at line 749 ~> 
HTML(HttpServletResponse.setHeader(...)) at line 785.
   
   ---
   
   <details><summary><b>🔎 Expand here to view all instances of this 
finding</b></summary><br/>
     
     
   <div align=\"center\">
   
   
   | **File Path** | **Line Number** |
   | ------------- | ------------- |
   | solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java | 
[785](https://github.com/apache/solr/blob/a33ba6bb6cf2e46fb136f879a6bc5696b8f779d8/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java#L785)
 |
   | solr/core/src/java/org/apache/solr/security/AuthorizationUtils.java | 
[84](https://github.com/apache/solr/blob/a33ba6bb6cf2e46fb136f879a6bc5696b8f779d8/solr/core/src/java/org/apache/solr/security/AuthorizationUtils.java#L84)
 |
   | solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java | 
[545](https://github.com/apache/solr/blob/a33ba6bb6cf2e46fb136f879a6bc5696b8f779d8/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java#L545)
 |
   <p><a 
href="https://lift.sonatype.com/results/github.com/apache/solr/01GQEZBSKB0V8KWDB2MGK5EH8N?t=Infer|CROSS_SITE_SCRIPTING"
 target="_blank">Visit the Lift Web Console</a> to find more details in your 
report.</p></div></details>
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=371756702&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=371756702&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=371756702&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=371756702&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=371756702&lift_comment_rating=5)
 ]



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