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

Have NativeJavaPackage constructor that throws a ClassNotFoundException

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 8
    • None
    • core-libs
    • None
    • b93
    • Verified

    Description

      When people misspell a class name with packages, e.g.

      var ArrayList = java.util.ArrrayList
      var a = new ArrayList()

      they get an unhelpful error message:

      TypeError: [JavaPackage java.util.ArrrayList] is not a function

      We should add a @Constructor to NativeJavaPackage that simply throws a ClassNotFoundException to better inform the users of the nature of the error.

      Attachments

        Activity

          People

            attila Attila Szegedi
            attila Attila Szegedi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: