Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4862268

HTMLDocument.getElement(Element, Object, Object) return wrong value

    XMLWordPrintable

    Details

      Description



      Name: ssR10000 Date: 05/12/2003



      It's looks like the method HTMLDocument.getElement(Element, Object, Object)
      always return null value.

      21 tests failed due to this bug.

      ====== HTMLDocument2153 ====== getElement(e, attribute, value) for tag A
      Return incorrect element: null
      ====== HTMLDocument2154 ====== getElement(e, attribute, value) for tag ADDRESS
      Return incorrect element: null
      ====== HTMLDocument2155 ====== getElement(e, attribute, value) for tag B
      Return incorrect element: null
      ====== HTMLDocument2156 ====== getElement(e, attribute, value) for tag BIG
      Return incorrect element: null
      ====== HTMLDocument2157 ====== getElement(e, attribute, value) for tag CITE
      Return incorrect element: null
      ====== HTMLDocument2158 ====== getElement(e, attribute, value) for tag CODE
      Return incorrect element: null
      ====== HTMLDocument2159 ====== getElement(e, attribute, value) for tag DFN
      Return incorrect element: null
      ====== HTMLDocument2160 ====== getElement(e, attribute, value) for tag EM
      Return incorrect element: null
      ====== HTMLDocument2161 ====== getElement(e, attribute, value) for tag FONT
      Return incorrect element: null
      ====== HTMLDocument2162 ====== getElement(e, attribute, value) for tag I
      Return incorrect element: null
      ====== HTMLDocument2163 ====== getElement(e, attribute, value) for tag KBD
      Return incorrect element: null
      ====== HTMLDocument2164 ====== getElement(e, attribute, value) for tag SAMP
      Return incorrect element: null
      ====== HTMLDocument2165 ====== getElement(e, attribute, value) for tag SMALL
      Return incorrect element: null
      ====== HTMLDocument2166 ====== getElement(e, attribute, value) for tag STRIKE
      Return incorrect element: null
      ====== HTMLDocument2167 ====== getElement(e, attribute, value) for tag S
      Return incorrect element: null
      ====== HTMLDocument2168 ====== getElement(e, attribute, value) for tag STRONG
      Return incorrect element: null
      ====== HTMLDocument2169 ====== getElement(e, attribute, value) for tag SUB
      Return incorrect element: null
      ====== HTMLDocument2170 ====== getElement(e, attribute, value) for tag SUP
      Return incorrect element: null
      ====== HTMLDocument2171 ====== getElement(e, attribute, value) for tag TT
      Return incorrect element: null
      ====== HTMLDocument2172 ====== getElement(e, attribute, value) for tag U
      Return incorrect element: null
      ====== HTMLDocument2173 ====== getElement(e, attribute, value) for tag VAR
      Return incorrect element: null

      Each of these tests looks like:
      -------------------------------------------------------------------------------
      String magicid="magicid";
      String test="<!DOCTYPE HTML PUBLIC \"-//w3c//DTD html 3.2//EN\">"
             +"<HTML><TITLE>test</TITLE><BODY><A href=\"www.sun.com\" id=\""+magicid+"\">"
             +magic+"</A></BODY></HTML>";
                      
      HTMLEditorKit c = new HTMLEditorKit();
      HTMLDocument doc = null;
              
      try {
          doc = new HTMLDocument();
          c.read(new StringReader(test),doc,0);
      } catch(Exception e) {
          return Status.failed( "Unexpected "+e+" thrown" );
      }
      Element e = doc.getElement(doc.getDefaultRootElement(), HTML.Attribute.ID, magicid);
          
      if (e == null) {
          ref.println("Return incorrect element: null");
      }
      -------------------------------------------------------------------------------

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              idk Igor Kushnirskiy (Inactive)
              Reporter:
              sswsunw Ssw Ssw (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: