Github user dsmiley commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/430#discussion_r207900654
  
    --- Diff: solr/solrj/src/java/org/apache/solr/common/util/XML.java ---
    @@ -101,83 +102,53 @@ public final static void writeXML(Writer out, String 
tag, String val) throws IOE
         }
       }
     
    +  /** does NOT escape character data in val or attributes, must already be 
valid XML */
       public final static void writeUnescapedXML(Writer out, String tag, 
String val, Object... attrs) throws IOException {
    -    writeUnescapedXML(out, tag, (writer1) -> writer1.write(val), attrs);
    +    writeUnescapedAttrXML(out, tag, (writer1) -> writer1.write(val), 
attrs);
       }
     
    -  /** does NOT escape character data in val, must already be valid XML */
    -  public final static void writeUnescapedXML(Writer out, String tag, 
Writable val, Object... attrs) throws IOException {
    +  /** does NOT escape character data in attributes, must already be valid 
XML */
    +  public final static void writeUnescapedAttrXML(Writer out, String tag, 
Writable valWritable, Object... attrs) throws IOException {
    --- End diff --
    
    Again, if the method accepts "Writable", I think we make no mention of 
escaping or lack thereof in the method name.  Thus Lets name this simply 
`writeXML`?  I don't think "Attr" should be in the name since t's an optional 
aspect of what's written.  Fundamentally we're writing an "element", so another 
possible name is `writeElementXML`.  However writeXML is already in use here 
which is fine.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to