Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-201

contextChild parameter of Transform.getInstance may be null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: Java 1.4.2
    • Fix Version/s: Java 1.4.4
    • Component/s: Java
    • Security Level: Public (Public issues, viewable by everyone)
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC
    • Bugzilla Id:
      47762

      Description

      The following method of the class org.apache.xml.security.transforms.Transform does not test if the contextChild parameter is null:
      public static final Transform getInstance(
      Document doc,
      String algorithmURI,
      Element contextChild)

      I propose this modified code to fix this bug:
      public static final Transform getInstance(
      Document doc, String algorithmURI, Element contextChild)
      throws InvalidTransformException {

      HelperNodeList contextNodes = null;

      if (contextChild != null)

      { contextNodes = new HelperNodeList(); XMLUtils.addReturnToElement(doc, contextNodes); contextNodes.appendChild(contextChild); XMLUtils.addReturnToElement(doc, contextNodes); }

      return Transform.getInstance(doc, algorithmURI, contextNodes);
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              julienpasquier@free.fr Julien Pasquier
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: