equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4880663 6715757 |
26 * @bug 4880663 6715757 7031005 |
27 * @summary javap could output whitespace between class name and opening brace |
27 * @summary javap could output whitespace between class name and opening brace |
28 * javap prints "extends java.lang.Object" |
28 * javap prints "extends java.lang.Object" |
29 */ |
29 */ |
30 |
30 |
31 |
31 |
37 } |
37 } |
38 |
38 |
39 public void run() throws IOException { |
39 public void run() throws IOException { |
40 File javaFile = writeTestFile(); |
40 File javaFile = writeTestFile(); |
41 File classFile = compileTestFile(javaFile); |
41 File classFile = compileTestFile(javaFile); |
42 verify(classFile, "class Test extends java.lang.Object {"); |
42 verify(classFile, "class Test {"); |
43 |
43 |
44 if (errors > 0) |
44 if (errors > 0) |
45 throw new Error(errors + " found."); |
45 throw new Error(errors + " found."); |
46 } |
46 } |
47 |
47 |