no check for null in Class.getMethod(String name, Class[ ] parameters)

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 1.3.1
    • Affects Version/s: 1.3.0
    • Component/s: hotspot
    • beta
    • generic, sparc
    • generic, solaris_7



        Name: rmT116609 Date: 12/01/2000


        java version "1.3.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
        Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)



        This piece of code generates the following error on the VM :

        import java.lang.reflect.Method;

        class Test{
        public static void main(String a[]){
        Class clazz;

                try {
                    clazz = Class.forName("java.lang.String");
                } catch ( ClassNotFoundException ce ) {
                    return;
                }

                try {
                    Method method = clazz.getMethod(null, null);
                } catch ( NoSuchMethodException e ) {
                    e.printStackTrace();
                    return;
                }
        }
        }


        #
        # HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
        # Please report this error at
        # http://java.sun.com/cgi-bin/bugreport.cgi
        #
        # Error ID: 4F533F57494E13120E43505002D4
        #

        abnormal program termination

        I guess there is no check for null for the method name.

        The bug was reported that the problem occurs on win32. But
        the problem occurs on Solaris and Linux. Please see the comments
        section for more information.
        (Review ID: 113119)
        ======================================================================

              Assignee:
              Coleen Phillimore
              Reporter:
              Ranjith Mandala (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: