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

The exception NegativeArraySizeException is illegally optimized away.

XMLWordPrintable

    • 1.2beta
    • x86, sparc
    • solaris_2.5.1, windows_95
    • Not verified


      allan.jacobs@Eng 1996-12-19

      algol% cat nase.java

      class nase {
         static int i = 0;
         public static void main (String argv[]) {
           try{
             int m[] = new int[-2];
           }
           catch(NegativeArraySizeException n) { i = 1;}
           System.out.println(i);
         }
      }
      algol% javac -d . nase.java
      algol% java nase
      0
      algol% echo $status
      0

            tturnidgsunw Todd Turnidge (Inactive)
            ajacobssunw Allan Jacobs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: