jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java
author chegar
Sun, 17 Aug 2014 15:54:13 +0100
changeset 25859 3317bb8137f4
parent 24572 jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java@5c9e5961d21c
child 26464 65b37da18e06
permissions -rw-r--r--
8054834: Modular Source Code Reviewed-by: alanb, chegar, ihse, mduigou Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
     1
/*
14222
58f55d4dde46 7196190: Improve method of handling MethodHandles
jrose
parents: 13423
diff changeset
     2
 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
     4
 *
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    10
 *
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    15
 * accompanied this code).
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    16
 *
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    20
 *
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    23
 * questions.
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    24
 */
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    25
8822
8145ab9f5f86 7012648: move JSR 292 to package java.lang.invoke and adjust names
jrose
parents: 8821
diff changeset
    26
package java.lang.invoke;
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    27
9780
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    28
import java.security.AccessController;
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    29
import java.security.PrivilegedAction;
13423
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    30
import sun.misc.Unsafe;
9780
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    31
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    32
/**
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    33
 * This class consists exclusively of static names internal to the
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    34
 * method handle implementation.
8822
8145ab9f5f86 7012648: move JSR 292 to package java.lang.invoke and adjust names
jrose
parents: 8821
diff changeset
    35
 * Usage:  {@code import static java.lang.invoke.MethodHandleStatics.*}
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    36
 * @author John Rose, JSR 292 EG
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    37
 */
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    38
/*non-public*/ class MethodHandleStatics {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    39
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    40
    private MethodHandleStatics() { }  // do not instantiate
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    41
13423
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    42
    static final Unsafe UNSAFE = Unsafe.getUnsafe();
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    43
9780
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    44
    static final boolean DEBUG_METHOD_HANDLE_NAMES;
13423
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    45
    static final boolean DUMP_CLASS_FILES;
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    46
    static final boolean TRACE_INTERPRETER;
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    47
    static final boolean TRACE_METHOD_LINKAGE;
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    48
    static final Integer COMPILE_THRESHOLD;
9780
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    49
    static {
13423
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    50
        final Object[] values = { false, false, false, false, null };
9780
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    51
        AccessController.doPrivileged(new PrivilegedAction<Void>() {
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    52
                public Void run() {
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    53
                    values[0] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DEBUG_NAMES");
13423
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    54
                    values[1] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DUMP_CLASS_FILES");
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    55
                    values[2] = Boolean.getBoolean("java.lang.invoke.MethodHandle.TRACE_INTERPRETER");
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    56
                    values[3] = Boolean.getBoolean("java.lang.invoke.MethodHandle.TRACE_METHOD_LINKAGE");
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    57
                    values[4] = Integer.getInteger("java.lang.invoke.MethodHandle.COMPILE_THRESHOLD");
9780
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    58
                    return null;
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    59
                }
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    60
            });
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    61
        DEBUG_METHOD_HANDLE_NAMES = (Boolean) values[0];
13423
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    62
        DUMP_CLASS_FILES          = (Boolean) values[1];
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    63
        TRACE_INTERPRETER         = (Boolean) values[2];
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    64
        TRACE_METHOD_LINKAGE      = (Boolean) values[3];
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    65
        COMPILE_THRESHOLD         = (Integer) values[4];
9780
6fc3b49cfee4 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
jrose
parents: 9731
diff changeset
    66
    }
9731
d0f7a3e441c4 7044892: JSR 292: API entry points sometimes throw the wrong exceptions or doesn't throw the expected one
jrose
parents: 9646
diff changeset
    67
24572
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    68
    /** Tell if any of the debugging switches are turned on.
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    69
     *  If this is the case, it is reasonable to perform extra checks or save extra information.
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    70
     */
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    71
    /*non-public*/ static boolean debugEnabled() {
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    72
        return (DEBUG_METHOD_HANDLE_NAMES |
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    73
                DUMP_CLASS_FILES |
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    74
                TRACE_INTERPRETER |
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    75
                TRACE_METHOD_LINKAGE);
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    76
    }
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
    77
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    78
    /*non-public*/ static String getNameString(MethodHandle target, MethodType type) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    79
        if (type == null)
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    80
            type = target.type();
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    81
        MemberName name = null;
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    82
        if (target != null)
13423
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
    83
            name = target.internalMemberName();
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    84
        if (name == null)
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    85
            return "invoke" + type;
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    86
        return name.getName() + type;
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    87
    }
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    88
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    89
    /*non-public*/ static String getNameString(MethodHandle target, MethodHandle typeHolder) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    90
        return getNameString(target, typeHolder == null ? (MethodType) null : typeHolder.type());
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    91
    }
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    92
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    93
    /*non-public*/ static String getNameString(MethodHandle target) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    94
        return getNameString(target, (MethodType) null);
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    95
    }
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    96
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    97
    /*non-public*/ static String addTypeString(Object obj, MethodHandle target) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    98
        String str = String.valueOf(obj);
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
    99
        if (target == null)  return str;
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   100
        int paren = str.indexOf('(');
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   101
        if (paren >= 0) str = str.substring(0, paren);
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   102
        return str + target.type();
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   103
    }
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   104
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   105
    // handy shared exception makers (they simplify the common case code)
24572
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
   106
    /*non-public*/ static InternalError newInternalError(String message) {
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
   107
        return new InternalError(message);
5c9e5961d21c 8037210: Get rid of char-based descriptions 'J' of basic types
vlivanov
parents: 16100
diff changeset
   108
    }
14089
0a41b980d62a 8000989: smaller code changes to make future JSR 292 backports easier
twisti
parents: 13423
diff changeset
   109
    /*non-public*/ static InternalError newInternalError(String message, Throwable cause) {
0a41b980d62a 8000989: smaller code changes to make future JSR 292 backports easier
twisti
parents: 13423
diff changeset
   110
        return new InternalError(message, cause);
0a41b980d62a 8000989: smaller code changes to make future JSR 292 backports easier
twisti
parents: 13423
diff changeset
   111
    }
0a41b980d62a 8000989: smaller code changes to make future JSR 292 backports easier
twisti
parents: 13423
diff changeset
   112
    /*non-public*/ static InternalError newInternalError(Throwable cause) {
0a41b980d62a 8000989: smaller code changes to make future JSR 292 backports easier
twisti
parents: 13423
diff changeset
   113
        return new InternalError(cause);
0a41b980d62a 8000989: smaller code changes to make future JSR 292 backports easier
twisti
parents: 13423
diff changeset
   114
    }
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   115
    /*non-public*/ static RuntimeException newIllegalStateException(String message) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   116
        return new IllegalStateException(message);
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   117
    }
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   118
    /*non-public*/ static RuntimeException newIllegalStateException(String message, Object obj) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   119
        return new IllegalStateException(message(message, obj));
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   120
    }
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   121
    /*non-public*/ static RuntimeException newIllegalArgumentException(String message) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   122
        return new IllegalArgumentException(message);
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   123
    }
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   124
    /*non-public*/ static RuntimeException newIllegalArgumentException(String message, Object obj) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   125
        return new IllegalArgumentException(message(message, obj));
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   126
    }
9646
5ebbe5ab084f 6939861: JVM should handle more conversion operations
jrose
parents: 8822
diff changeset
   127
    /*non-public*/ static RuntimeException newIllegalArgumentException(String message, Object obj, Object obj2) {
5ebbe5ab084f 6939861: JVM should handle more conversion operations
jrose
parents: 8822
diff changeset
   128
        return new IllegalArgumentException(message(message, obj, obj2));
5ebbe5ab084f 6939861: JVM should handle more conversion operations
jrose
parents: 8822
diff changeset
   129
    }
14222
58f55d4dde46 7196190: Improve method of handling MethodHandles
jrose
parents: 13423
diff changeset
   130
    /*non-public*/ static Error uncaughtException(Throwable ex) {
14089
0a41b980d62a 8000989: smaller code changes to make future JSR 292 backports easier
twisti
parents: 13423
diff changeset
   131
        throw newInternalError("uncaught exception", ex);
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   132
    }
13423
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
   133
    static Error NYI() {
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
   134
        throw new AssertionError("NYI");
17843fff200d 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10419
diff changeset
   135
    }
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   136
    private static String message(String message, Object obj) {
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   137
        if (obj != null)  message = message + ": " + obj;
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   138
        return message;
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   139
    }
9646
5ebbe5ab084f 6939861: JVM should handle more conversion operations
jrose
parents: 8822
diff changeset
   140
    private static String message(String message, Object obj, Object obj2) {
5ebbe5ab084f 6939861: JVM should handle more conversion operations
jrose
parents: 8822
diff changeset
   141
        if (obj != null || obj2 != null)  message = message + ": " + obj + ", " + obj2;
5ebbe5ab084f 6939861: JVM should handle more conversion operations
jrose
parents: 8822
diff changeset
   142
        return message;
5ebbe5ab084f 6939861: JVM should handle more conversion operations
jrose
parents: 8822
diff changeset
   143
    }
8821
2836ee97ee27 6839872: remove implementation inheritance from JSR 292 APIs
jrose
parents:
diff changeset
   144
}