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

For an argument which doesn't contain local part, QName#valueOf doesn't detect error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7
    • xml
    • x86
    • linux

      QName#valueOf should throw IllegalArgumentException in following test case.

      ----
      import javax.xml.namespace.*;

      class Test {
              static public void main(String args[]){
                      try{
                              QName.valueOf("{http://java.sun.com}");
                      }catch(IllegalArgumentException e){
                              e.printStackTrace();
                      }
              }
      }
      ----

      But the exception is not thrown in JDK 1.5 , 6 niether 7.

            joehw Joe Wang
            tyamagat Tatsuki Yamagata (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: