mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-19 23:48:50 +00:00
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
Reviewed-by: jjg, vromero
This commit is contained in:
parent
afd134e028
commit
8244fe0c5c
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4695463
|
||||
* @summary DA versus switch: javac allows reference to uninitialized variable
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail DASwitch.java
|
||||
* @compile/fail/ref=DASwitch.out -XDrawDiagnostics DASwitch.java
|
||||
*/
|
||||
|
||||
public class DASwitch {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
DASwitch.java:22:32: compiler.err.var.might.not.have.been.initialized: b
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4533915
|
||||
* @summary javac should not analyze final parameters for definite assignment status
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail DUParam1.java
|
||||
* @compile/fail/ref=DUParam1.out -XDrawDiagnostics DUParam1.java
|
||||
*/
|
||||
|
||||
public class DUParam1 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
DUParam1.java:13:20: compiler.err.final.parameter.may.not.be.assigned: args
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4533915
|
||||
* @summary javac should not analyze final parameters for definite assignment status
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail DUParam2.java
|
||||
* @compile/fail/ref=DUParam2.out -XDrawDiagnostics DUParam2.java
|
||||
*/
|
||||
|
||||
public class DUParam2 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
DUParam2.java:15:24: compiler.err.final.parameter.may.not.be.assigned: e
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4087865 4277291
|
||||
* @summary Verify definite assignment of blank finals after 'this(...)'
|
||||
* @author William Maddox (maddox)
|
||||
*
|
||||
* @compile/fail DefAssignAfterThis_1.java
|
||||
* @compile/fail/ref=DefAssignAfterThis_1.out -XDrawDiagnostics DefAssignAfterThis_1.java
|
||||
*/
|
||||
|
||||
public class DefAssignAfterThis_1 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
DefAssignAfterThis_1.java:16:9: compiler.err.var.might.already.be.assigned: x
|
||||
1 error
|
||||
@ -1,28 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4087865
|
||||
* @summary Verify definite assignment of blank finals after 'this(...)'
|
||||
* @author William Maddox (maddox)
|
||||
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4240487
|
||||
* @summary Verify that we keep track of init/uninits in Try statement
|
||||
* without finalizer.
|
||||
*
|
||||
* @compile/fail DefAssignAfterTry1.java
|
||||
* @compile/fail/ref=DefAssignAfterTry1.out -XDrawDiagnostics DefAssignAfterTry1.java
|
||||
*/
|
||||
|
||||
class E1 extends Exception {}
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
DefAssignAfterTry1.java:28:28: compiler.err.var.might.not.have.been.initialized: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4240487
|
||||
* @summary Verify that we keep track of init/uninits in Try statement
|
||||
* without finalizer.
|
||||
*
|
||||
* @compile/fail DefAssignAfterTry2.java
|
||||
* @compile/fail/ref=DefAssignAfterTry2.out -XDrawDiagnostics DefAssignAfterTry2.java
|
||||
*/
|
||||
|
||||
class E1 extends Exception {}
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
DefAssignAfterTry2.java:32:28: compiler.err.var.might.not.have.been.initialized: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4240487
|
||||
* @summary Verify that we keep track of init/uninits in Try statement
|
||||
* without finalizer.
|
||||
*
|
||||
* @compile/fail DefAssignAfterTry3.java
|
||||
* @compile/fail/ref=DefAssignAfterTry3.out -XDrawDiagnostics DefAssignAfterTry3.java
|
||||
*/
|
||||
|
||||
class E1 extends Exception {}
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
DefAssignAfterTry3.java:32:28: compiler.err.var.might.not.have.been.initialized: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4704365
|
||||
* @summary definite assignment status within the case expression
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4704365.java
|
||||
* @compile/fail/ref=T4704365.out -XDrawDiagnostics T4704365.java
|
||||
*/
|
||||
|
||||
class T4704365 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4704365.java:16:14: compiler.err.var.might.not.have.been.initialized: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4717164
|
||||
* @summary missing catch not reachable error when nested try-finally returns in finally
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4717164.java
|
||||
* @compile/fail/ref=T4717164.out -XDrawDiagnostics T4717164.java
|
||||
*/
|
||||
|
||||
class T4717164 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4717164.java:20:11: compiler.err.except.never.thrown.in.try: java.lang.ClassNotFoundException
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4717165
|
||||
* @summary when can a statement complete normally? (break&continue versus finally)
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4717165.java
|
||||
* @compile/fail/ref=T4717165.out -XDrawDiagnostics T4717165.java
|
||||
*/
|
||||
|
||||
class T4717165 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4717165.java:18:9: compiler.err.unreachable.stmt
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4718142
|
||||
* @summary DU analysis not conservative for try-finally
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4718142.java
|
||||
* @compile/fail/ref=T4718142.out -XDrawDiagnostics T4718142.java
|
||||
*/
|
||||
|
||||
class T4718142 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4718142.java:20:17: compiler.err.var.might.be.assigned.in.loop: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4718142
|
||||
* @summary DU analysis not conservative for try-finally
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4718142a.java
|
||||
* @compile/fail/ref=T4718142a.out -XDrawDiagnostics T4718142a.java
|
||||
*/
|
||||
|
||||
class T4718142a {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4718142a.java:18:21: compiler.err.var.might.be.assigned.in.loop: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4718708
|
||||
* @summary bug in DU analysis of while loop
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4718708.java
|
||||
* @compile/fail/ref=T4718708.out -XDrawDiagnostics T4718708.java
|
||||
*/
|
||||
|
||||
class T4718708 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4718708.java:14:13: compiler.err.var.might.be.assigned.in.loop: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4721062
|
||||
* @summary DA treatment of return statements in constructors
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4721062a.java
|
||||
* @compile/fail/ref=T4721062a.out -XDrawDiagnostics T4721062a.java
|
||||
*/
|
||||
|
||||
class T4721062a {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4721062a.java:14:13: compiler.err.var.might.not.have.been.initialized: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4721062
|
||||
* @summary DA treatment of return statements in constructors
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4721062b.java
|
||||
* @compile/fail/ref=T4721062b.out -XDrawDiagnostics T4721062b.java
|
||||
*/
|
||||
|
||||
class T4721062b {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4721062b.java:14:13: compiler.err.var.might.not.have.been.initialized: i
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4725725
|
||||
* @summary missing DA error in anonymous ctor
|
||||
* @author Neal Gafter (gafter)
|
||||
*
|
||||
* @compile/fail T4725725.java
|
||||
* @compile/fail/ref=T4725725.out -XDrawDiagnostics T4725725.java
|
||||
*/
|
||||
|
||||
class T4725725 {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
T4725725.java:13:21: compiler.err.var.might.not.have.been.initialized: x
|
||||
1 error
|
||||
@ -1,33 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4053998
|
||||
* @summary Compiler used to not notice the uncaught checked exception.
|
||||
* @author turnidge
|
||||
*
|
||||
* @compile/fail UncaughtException.java
|
||||
* @compile/fail/ref=UncaughtException.out -XDrawDiagnostics UncaughtException.java
|
||||
*/
|
||||
|
||||
interface I {
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
UncaughtException.java:20:1: compiler.err.override.meth.doesnt.throw: (compiler.misc.cant.implement: throwCheckedException(), A, throwCheckedException(), I), java.lang.Throwable
|
||||
1 error
|
||||
Loading…
x
Reference in New Issue
Block a user