jdk/test/java/lang/management/CompositeData/ThreadInfoCompositeData.java
author alanb
Thu, 17 Mar 2016 19:04:16 +0000
changeset 36511 9d0388c6b336
parent 30376 2ccf2cf7ea48
child 41911 b3bb62588635
permissions -rw-r--r--
8142968: Module System implementation Summary: Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282 Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, chris.hegarty@oracle.com, alexandr.scherbatiy@oracle.com, amy.lu@oracle.com, calvin.cheung@oracle.com, daniel.fuchs@oracle.com, erik.joelsson@oracle.com, harold.seigel@oracle.com, jaroslav.bachorik@oracle.com, jean-francois.denise@oracle.com, jan.lahoda@oracle.com, james.laskey@oracle.com, lois.foltan@oracle.com, miroslav.kos@oracle.com, huaming.li@oracle.com, sean.mullan@oracle.com, naoto.sato@oracle.com, masayoshi.okutsu@oracle.com, peter.levart@gmail.com, philip.race@oracle.com, claes.redestad@oracle.com, sergey.bylokhov@oracle.com, alexandre.iline@oracle.com, volker.simonis@gmail.com, staffan.larsen@oracle.com, stuart.marks@oracle.com, semyon.sadetsky@oracle.com, serguei.spitsyn@oracle.com, sundararajan.athijegannathan@oracle.com, valerie.peng@oracle.com, vincent.x.ryan@oracle.com, weijun.wang@oracle.com, yuri.nesterenko@oracle.com, yekaterina.kantserova@oracle.com, alexander.kulyakhtin@oracle.com, felix.yang@oracle.com, andrei.eremeev@oracle.com, frank.yuan@oracle.com, sergei.pikalev@oracle.com, sibabrata.sahoo@oracle.com, tiantian.du@oracle.com, sha.jiang@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
30376
2ccf2cf7ea48 8078896: Add @modules as needed to the jdk_svc tests
ykantser
parents: 29101
diff changeset
     2
 * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4347
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4347
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4347
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * @test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @bug     4982289
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * @summary Test ThreadInfo.from to return a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 *          ThreadInfo object. Or throw exception if
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 *          the input CompositeData is invalid.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * @author  Mandy Chung
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 *
30376
2ccf2cf7ea48 8078896: Add @modules as needed to the jdk_svc tests
ykantser
parents: 29101
diff changeset
    32
 * @modules java.management
4347
ab0a9f495844 6907177: Update jdk tests to remove unncessary -source and -target options
darcy
parents: 2
diff changeset
    33
 * @compile OpenTypeConverter.java
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * @build ThreadInfoCompositeData
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * @run main ThreadInfoCompositeData
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import javax.management.openmbean.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.lang.management.LockInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import java.lang.management.MonitorInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import java.lang.management.ThreadInfo;
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
    42
import java.util.Objects;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
public class ThreadInfoCompositeData {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    private static StackTraceElement[] ste = new StackTraceElement[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    private static CompositeData[] steCD = new CompositeData[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    private static String lockClassName = "myClass";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    private static int lockIdentityHashCode = 123456;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    private static String lockName = lockClassName + '@' +
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        Integer.toHexString(lockIdentityHashCode);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    private static LockInfo lockInfo =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
        new LockInfo(lockClassName, lockIdentityHashCode);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    public static void main(String[] argv) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        // A valid CompositeData is passed to ThreadInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        createGoodCompositeData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        // A valid CompositeData for JDK 5.0 ThreadInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        // is passed to ThreadInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        createV5ThreadInfo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        // An invalid CompositeData is passed to ThreadInfo.from()
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        badNameCompositeData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        badTypeCompositeData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        System.out.println("Test passed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    public static void createGoodCompositeData() throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        CompositeType ct =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
            new CompositeType("MyCompositeType",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
                              "CompositeType for ThreadInfo",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
                              validItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
                              validItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
                              validItemTypes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        CompositeData cd =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
            new CompositeDataSupport(ct,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
                                     validItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
                                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        ThreadInfo info = ThreadInfo.from(cd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        checkThreadInfo(info);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    public static void createV5ThreadInfo() throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        String[] v5ItemNames = new String[NUM_V5_ATTS];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        OpenType[] v5ItemTypes = new OpenType[NUM_V5_ATTS];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        Object[] v5ItemValues = new Object[NUM_V5_ATTS];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        for (int i = 0; i < NUM_V5_ATTS; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
            v5ItemNames[i] = validItemNames[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            v5ItemTypes[i] = validItemTypes[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
            v5ItemValues[i] = values[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        CompositeType ct =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            new CompositeType("MyCompositeType",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
                              "CompositeType for JDK 5.0 ThreadInfo",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
                              v5ItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
                              v5ItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
                              v5ItemTypes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        CompositeData cd =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
            new CompositeDataSupport(ct,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
                                     v5ItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                                     v5ItemValues);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        ThreadInfo info = ThreadInfo.from(cd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        checkThreadInfo(info);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
   static void checkThreadInfo(ThreadInfo info) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        if (info.getThreadId() != ((Long) values[THREAD_ID]).longValue()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
            throw new RuntimeException("Thread Id = " + info.getThreadId() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
               " expected = " + values[THREAD_ID]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        if (!info.getThreadName().equals(values[THREAD_NAME])) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            throw new RuntimeException("Thread Name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
               info.getThreadName() + " expected = " + values[THREAD_NAME]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        if (info.getThreadState() != Thread.State.RUNNABLE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
            throw new RuntimeException("Thread Name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
               info.getThreadName() + " expected = " + Thread.State.RUNNABLE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        if (info.getBlockedTime() != ((Long) values[BLOCKED_TIME]).longValue()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
            throw new RuntimeException("blocked time = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
               info.getBlockedTime() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
               " expected = " + values[BLOCKED_TIME]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        if (info.getBlockedCount() != ((Long) values[BLOCKED_COUNT]).longValue()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            throw new RuntimeException("blocked count = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
               info.getBlockedCount() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
               " expected = " + values[BLOCKED_COUNT]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        if (info.getWaitedTime() != ((Long) values[WAITED_TIME]).longValue()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            throw new RuntimeException("waited time = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
               info.getWaitedTime() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
               " expected = " + values[WAITED_TIME]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        if (info.getWaitedCount() != ((Long) values[WAITED_COUNT]).longValue()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            throw new RuntimeException("waited count = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
               info.getWaitedCount() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
               " expected = " + values[WAITED_COUNT]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        if (!info.getLockName().equals(values[LOCK_NAME])) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
            throw new RuntimeException("Lock Name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
               info.getLockName() + " expected = " + values[LOCK_NAME]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        if (info.getLockOwnerId() !=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                ((Long) values[LOCK_OWNER_ID]).longValue()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            throw new RuntimeException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
               "LockOwner Id = " + info.getLockOwnerId() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
               " expected = " + values[LOCK_OWNER_ID]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        if (!info.getLockOwnerName().equals(values[LOCK_OWNER_NAME])) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
            throw new RuntimeException("LockOwner Name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
               info.getLockOwnerName() + " expected = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
               values[LOCK_OWNER_NAME]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        }
29101
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   152
        if (!values[DAEMON].equals(info.isDaemon())) {
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   153
            throw new RuntimeException("Daemon = " +
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   154
               info.isDaemon() + " expected = " +
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   155
               values[DAEMON]);
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   156
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        checkStackTrace(info.getStackTrace());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        checkLockInfo(info.getLockInfo());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    private static void checkStackTrace(StackTraceElement[] s)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        if (ste.length != s.length) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            throw new RuntimeException("Stack Trace length = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
                s.length + " expected = " + ste.length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        StackTraceElement s1 = ste[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
        StackTraceElement s2 = s[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
        if (!s1.getClassName().equals(s2.getClassName())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
            throw new RuntimeException("Class name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
                s2.getClassName() + " expected = " + s1.getClassName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        }
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   177
        if (!Objects.equals(s1.getModuleName(), s2.getModuleName())) {
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   178
            throw new RuntimeException("Module name = " +
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   179
                s2.getModuleName() + " expected = " + s1.getModuleName());
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   180
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   181
        if (!Objects.equals(s1.getModuleVersion(), s2.getModuleVersion())) {
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   182
            throw new RuntimeException("Module version = " +
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   183
                s2.getModuleVersion() + " expected = " + s1.getModuleVersion());
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   184
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        if (!s1.getMethodName().equals(s2.getMethodName())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
            throw new RuntimeException("Method name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                s2.getMethodName() + " expected = " + s1.getMethodName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        if (!s1.getFileName().equals(s2.getFileName())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            throw new RuntimeException("File name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                s2.getFileName() + " expected = " + s1.getFileName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        if (s1.getLineNumber() != s2.getLineNumber()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
            throw new RuntimeException("Line number = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                s2.getLineNumber() + " expected = " + s1.getLineNumber());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    private static void checkLockInfo(LockInfo li)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        if (!li.getClassName().equals(lockInfo.getClassName())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
            throw new RuntimeException("Class Name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
                li.getClassName() + " expected = " + lockInfo.getClassName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
            throw new RuntimeException("Class Name = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
                li.getIdentityHashCode() + " expected = " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                lockInfo.getIdentityHashCode());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    public static void badNameCompositeData() throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        CompositeType ct =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
            new CompositeType("MyCompositeType",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                              "CompositeType for ThreadInfo",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                              badItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                              badItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
                              validItemTypes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
        CompositeData cd =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
            new CompositeDataSupport(ct,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
                                     badItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
            ThreadInfo info = ThreadInfo.from(cd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        } catch (IllegalArgumentException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
            System.out.println("Expected exception: " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
                e.getMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
            return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        throw new RuntimeException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
            "IllegalArgumentException not thrown");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    public static void badTypeCompositeData() throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        CompositeType ct =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
            new CompositeType("MyCompositeType",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
                              "CompositeType for ThreadInfo",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
                              validItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
                              validItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
                              badItemTypes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
        // patch values[STACK_TRACE] to Long
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
        values[STACK_TRACE] = new Long(1000);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
        values[LOCK_INFO] = new Long(1000);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
        CompositeData cd =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
            new CompositeDataSupport(ct,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
                                     validItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
                                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
            ThreadInfo info = ThreadInfo.from(cd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
        } catch (IllegalArgumentException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
            System.out.println("Expected exception: " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
                e.getMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
            return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
        throw new RuntimeException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
            "IllegalArgumentException not thrown");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
    private static final int THREAD_ID       = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
    private static final int THREAD_NAME     = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
    private static final int THREAD_STATE    = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    private static final int BLOCKED_TIME    = 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    private static final int BLOCKED_COUNT   = 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
    private static final int WAITED_TIME     = 5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    private static final int WAITED_COUNT    = 6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
    private static final int LOCK_NAME       = 7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    private static final int LOCK_OWNER_ID   = 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
    private static final int LOCK_OWNER_NAME = 9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
    private static final int STACK_TRACE     = 10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
    private static final int SUSPENDED       = 11;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
    private static final int IN_NATIVE       = 12;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
    private static final int NUM_V5_ATTS     = 13;
29101
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   276
    // JDK 6.0 ThreadInfo attributes
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
    private static final int LOCK_INFO       = 13;
29101
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   278
    // JDK 9.0 ThreadInfo attributes
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   279
    private static final int DAEMON          = 14;
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   280
    private static final int PRIORITY        = 15;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
    private static final String[] validItemNames = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
        "threadId",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
        "threadName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
        "threadState",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
        "blockedTime",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
        "blockedCount",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
        "waitedTime",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
        "waitedCount",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
        "lockName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
        "lockOwnerId",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
        "lockOwnerName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
        "stackTrace",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
        "suspended",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
        "inNative",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
        "lockInfo",
29101
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   297
        "daemon",
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   298
        "priority",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
    private static OpenType[] validItemTypes = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
        SimpleType.STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
        SimpleType.STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
        SimpleType.STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
        SimpleType.STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        null,  // ArrayType for StackTraceElement[]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
        SimpleType.BOOLEAN,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
        SimpleType.BOOLEAN,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
        null,  // CompositeType for LockInfo
29101
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   316
        SimpleType.BOOLEAN,
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   317
        SimpleType.INTEGER,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
    private static Object[] values = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
        new Long(100),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
        "FooThread",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
        "RUNNABLE",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
        new Long(200),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
        new Long(10),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
        new Long(300),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
        new Long(20),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
        lockName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
        new Long(99),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
        "BarThread",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
        steCD,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
        new Boolean(false),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
        new Boolean(false),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
        null, // To be initialized to lockInfoCD
29101
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   335
        new Boolean(false),
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   336
        Thread.NORM_PRIORITY,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
    private static final String[] steItemNames = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
        "className",
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   341
        "moduleName",
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   342
        "moduleVersion",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
        "methodName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
        "fileName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
        "lineNumber",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
        "nativeMethod",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
    private static final String[] lockInfoItemNames = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
        "className",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
        "identityHashCode",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
    static {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
        // create stack trace element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
        ste[0] = new StackTraceElement("FooClass", "getFoo", "Foo.java", 100);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
        // initialize the ste[0] and values and validItemTypes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
            CompositeType steCType = (CompositeType)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
                OpenTypeConverter.toOpenType(StackTraceElement.class);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
            validItemTypes[STACK_TRACE] = new ArrayType(1, steCType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
            final Object[] steValue = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
                ste[0].getClassName(),
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   366
                ste[0].getModuleName(),
9d0388c6b336 8142968: Module System implementation
alanb
parents: 30376
diff changeset
   367
                ste[0].getModuleVersion(),
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
                ste[0].getMethodName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
                ste[0].getFileName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
                new Integer(ste[0].getLineNumber()),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
                new Boolean(ste[0].isNativeMethod()),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
            };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
            steCD[0] =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
                new CompositeDataSupport(steCType,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
                                         steItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
                                         steValue);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
            CompositeType lockInfoCType = (CompositeType)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
                OpenTypeConverter.toOpenType(LockInfo.class);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
            validItemTypes[LOCK_INFO] = lockInfoCType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
            final Object[] lockInfoValue = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
                lockInfo.getClassName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
                lockInfo.getIdentityHashCode(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
            };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
            values[LOCK_INFO] =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
                new CompositeDataSupport(lockInfoCType,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
                                         lockInfoItemNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
                                         lockInfoValue);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
        } catch (Exception e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
            throw new RuntimeException(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
    private static final String[] badItemNames = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
        "threadId",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
        "threadName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
        "threadState",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
        "blockedTime",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
        "blockedCount",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
        "waitedTime",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
        "waitedCount",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
        "lockName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
        "lockOwnerId",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
        "lockOwnerName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
        "BadStackTrace", // bad item name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
        "suspended",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
        "inNative",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
        "lockInfo",
29101
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   412
        "daemon",
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   413
        "priority",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
    private static final OpenType[] badItemTypes = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
        SimpleType.STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
        SimpleType.STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
        SimpleType.STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
        SimpleType.LONG,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
        SimpleType.STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
        SimpleType.LONG,  // bad type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
        SimpleType.BOOLEAN,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
        SimpleType.BOOLEAN,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
        SimpleType.LONG,  // bad type
29101
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   430
        SimpleType.BOOLEAN,
55f7a91aaa32 6588467: Add isDaemon() and getPriority() to ThreadInfo
jmanson
parents: 5506
diff changeset
   431
        SimpleType.INTEGER,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
}