langtools/test/tools/javah/T7185778.java
author jwilhelm
Thu, 07 Feb 2013 15:51:25 +0100
changeset 15605 bf7de87bbe3a
parent 13690 8be9ba21c4a9
child 30730 d3ce7619db2c
permissions -rw-r--r--
8006432: Ratio flags should be unsigned Summary: Flags changed to be of uintx type Reviewed-by: johnc, tamao
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13690
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     1
/*
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     4
 *
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     7
 * published by the Free Software Foundation.
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     8
 *
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    13
 * accompanied this code).
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    14
 *
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    18
 *
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    21
 * questions.
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    22
 */
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    23
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    24
/*
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    25
 * @test
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    26
 * @bug 7185778
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    27
 * @summary javah error "Not a valid class name" on class names with dollar signs
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    28
 *   The first two tests are on an inner class name whose name does not contain $.
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    29
 *   The second two tests are on an inner class name whose name does contain $.
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    30
 *   The last test is on an outer class whose name contains $.
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    31
 * @run main T7185778 T7185778$inner
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    32
 * @run main T7185778 T7185778.inner
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    33
 * @run main T7185778 T7185778$inner$
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    34
 * @run main T7185778 T7185778.inner$
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    35
 * @run main T7185778 xx$yy
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    36
 */
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    37
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    38
public class T7185778 {
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    39
    class inner {
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    40
        native byte[] xxxxx(String name);
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    41
    }
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    42
    class inner$ {
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    43
        native byte[] xxxxx(String name);
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    44
    }
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    45
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    46
    static public void main(String[] args) {
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    47
        int rc = com.sun.tools.javah.Main.run(args, null);
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    48
        if ( rc != 0) {
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    49
            throw new Error("javah returned non zero: " + rc);
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    50
        }
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    51
    }
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    52
}
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    53
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    54
class xx$yy {
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    55
    native byte[] xxxxx(String name);
8be9ba21c4a9 7185778: javah error "Not a valid class name" on class names with dollar signs
jjh
parents:
diff changeset
    56
}