test/hotspot/jtreg/serviceability/sa/LingeredAppWithEnum.java
author sspitsyn
Tue, 26 Jun 2018 13:50:59 -0700
changeset 50802 fa380b3b2b7d
parent 48949 d2a860bc50a3
permissions -rw-r--r--
8205721: Problem list serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatArrayCorrectnessTest.java Summary: Add the test to the ProblemList.txt Reviewed-by: dcubed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48949
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     1
/*
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     2
 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     4
 *
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     8
 *
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    13
 * accompanied this code).
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    14
 *
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    18
 *
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    21
 * questions.
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    22
 */
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    23
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    24
import jdk.test.lib.apps.LingeredApp;
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    25
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    26
enum Song {
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    27
  HALL_OF_FAME,
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    28
  HAVANA
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    29
};
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    30
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    31
public class LingeredAppWithEnum extends LingeredApp {
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    32
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    33
    public static void main(String args[]) {
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    34
      for (Song s : Song.values()) {
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    35
          System.out.println ("song " + s);
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    36
      }
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    37
      LingeredApp.main(args);
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    38
    }
d2a860bc50a3 8175384: SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes
jgeorge
parents:
diff changeset
    39
 }