Lines 31-37
Link Here
|
31 |
// All specified tests which does not belong to the class are skipped... |
31 |
// All specified tests which does not belong to the class are skipped... |
32 |
static { |
32 |
static { |
33 |
// TESTS_NAMES = new String[] { "test127" }; |
33 |
// TESTS_NAMES = new String[] { "test127" }; |
34 |
// TESTS_NUMBERS = new int[] { 109 }; |
34 |
// TESTS_NUMBERS = new int[] { 113 }; |
35 |
// TESTS_RANGE = new int[] { 108, -1 }; |
35 |
// TESTS_RANGE = new int[] { 108, -1 }; |
36 |
} |
36 |
} |
37 |
|
37 |
|
Lines 5816-5819
Link Here
|
5816 |
"int pe0, int pe1, int pe2, int pe3, int pe4, int pe5, int pe6, int pe7, int pe8, int pe9, int pea, int peb, int pec, int ped, int pee, int pef, \n" + |
5816 |
"int pe0, int pe1, int pe2, int pe3, int pe4, int pe5, int pe6, int pe7, int pe8, int pe9, int pea, int peb, int pec, int ped, int pee, int pef, \n" + |
5817 |
"int pf0, int pf1, int pf2, int pf3, int pf4, int pf5, int pf6, int pf7, int pf8, int pf9, int pfa, int pfb, int pfc"); |
5817 |
"int pf0, int pf1, int pf2, int pf3, int pf4, int pf5, int pf6, int pf7, int pf8, int pf9, int pfa, int pfb, int pfc"); |
5818 |
} |
5818 |
} |
|
|
5819 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=325567 |
5820 |
public void test113() { |
5821 |
this.runNegativeTest( |
5822 |
new String[] { |
5823 |
"X.java", |
5824 |
"import java.io.IOException;\n" + |
5825 |
"public class X {\n" + |
5826 |
" public static void bar(int i) {\n" + |
5827 |
" final String before;\n" + |
5828 |
" try {\n" + |
5829 |
" before = foo();\n" + |
5830 |
" } catch (IOException e) {\n" + |
5831 |
" // ignore\n" + |
5832 |
" }\n" + |
5833 |
" B b = new B(new I() {\n" + |
5834 |
" public String bar() {\n" + |
5835 |
" return new String(before);\n" + |
5836 |
" }\n" + |
5837 |
" });\n" + |
5838 |
" try {\n" + |
5839 |
" b.toString();\n" + |
5840 |
" } catch(Exception e) {\n" + |
5841 |
" // ignore\n" + |
5842 |
" }\n" + |
5843 |
" }\n" + |
5844 |
" private static String foo() throws IOException {\n" + |
5845 |
" return null;\n" + |
5846 |
" }\n" + |
5847 |
" static class B {\n" + |
5848 |
" B(I i) {\n" + |
5849 |
" //ignore\n" + |
5850 |
" }\n" + |
5851 |
" }\n" + |
5852 |
" static interface I {\n" + |
5853 |
" String bar();\n" + |
5854 |
" }\n" + |
5855 |
"}" |
5856 |
}, |
5857 |
"----------\n" + |
5858 |
"1. ERROR in X.java (at line 12)\n" + |
5859 |
" return new String(before);\n" + |
5860 |
" ^^^^^^\n" + |
5861 |
"The local variable before may not have been initialized\n" + |
5862 |
"----------\n", |
5863 |
null /* no extra class libraries */, |
5864 |
true /* flush output directory */, |
5865 |
null /* no custom options */, |
5866 |
true /* do not generate output */, |
5867 |
false /* do not show category */, |
5868 |
false /* do not show warning token */, |
5869 |
false /* do not skip javac for this peculiar test */, |
5870 |
false /* do not perform statements recovery */ |
5871 |
); |
5872 |
this.runConformTest( |
5873 |
new String[] { |
5874 |
"Y.java", //----------------------------------------------------------------------- |
5875 |
"public class Y {\n" + |
5876 |
" public static void main(String[] args) {\n" + |
5877 |
" try {\n" + |
5878 |
" X.bar(3);\n" + |
5879 |
" } catch(VerifyError e) {\n" + |
5880 |
" System.out.println(\"FAILED\");\n" + |
5881 |
" }\n" + |
5882 |
" }\n" + |
5883 |
"}", |
5884 |
}, |
5885 |
"", |
5886 |
null, |
5887 |
false, |
5888 |
null); |
5889 |
} |
5819 |
} |
5890 |
} |