Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-2840

S4435 should consider "SAXTransformerFactory"

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.7
    • Component/s: Rules
    • Labels:
      None

      Description

      In addition to javax.xml.transform.Transformer, S4435 should consider javax.xml.transform.sax.SAXTransformerFactory

      SAXTransformerFactory factory = SAXTransformerFactory.newInstance();
      factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
      factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
      factory.newXMLFilter(source);
      
      Transformer transformer = factory.newTransformer();
      transformer.transform(input, result);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alban.auzeill Alban Auzeill
                Reporter:
                alexandre.gigleux Alexandre Gigleux
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: