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

Class.forName("a b") throws IllegalArgumentException instead of ClassNotFoundExc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.8
    • core-libs
    • None



      Name: saC57035 Date: 04/09/99


      This report is submitted for the only purpose of tracking the JDK problem within EJCK.
      The problem is fixed in JDK 1.2, so please feel free to close out this report as
      integrated in JDK 1.2 (or as duplicate if this problem has already been reported).


      Class.forName(String s) with not legal s throws unexpected IllegalArgumentException
      ------------- Test.java -------------------------
      public class Test {
      public static void main(String [] args) throws ClassNotFoundException {
      Class.forName("a b");
      }
      }
      ------- Output --------------------------------
      java.lang.IllegalArgumentException: a b
              at Test.main(Test.java:3)
      -------------------------------------------------
      ======================================================================

            iris Iris Clark
            savzan Stanislav Avzan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: