Lines 8-14
Link Here
|
8 |
* Contributors: |
8 |
* Contributors: |
9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
10 |
* Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for |
10 |
* Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for |
11 |
* bugs 325755, 133125, 292478, 319201, 320170 and 332637 |
11 |
* bugs 325755, 133125, 292478, 319201, 320170, 332637 and 338303 |
12 |
*******************************************************************************/ |
12 |
*******************************************************************************/ |
13 |
package org.eclipse.jdt.core.tests.compiler.regression; |
13 |
package org.eclipse.jdt.core.tests.compiler.regression; |
14 |
|
14 |
|
Lines 14025-14028
Link Here
|
14025 |
}, |
14025 |
}, |
14026 |
""); |
14026 |
""); |
14027 |
} |
14027 |
} |
|
|
14028 |
// https://bugs.eclipse.org/338303 - Warning about Redundant assignment conflicts with definite assignment |
14029 |
public void testBug338303() { |
14030 |
this.runConformTest( |
14031 |
new String[] { |
14032 |
"Bug338303.java", |
14033 |
"import java.io.File;\n" + |
14034 |
"import java.io.IOException;\n" + |
14035 |
"\n" + |
14036 |
"public class Bug338303 {\n" + |
14037 |
" Object test(Object in, final File f) {\n" + |
14038 |
" Object local;\n" + |
14039 |
" try {\n" + |
14040 |
" local = in;\n" + |
14041 |
" if (local == null)\n" + |
14042 |
" local = loadEntry(f, false);\n" + |
14043 |
" } catch (final IOException e) {\n" + |
14044 |
" e.printStackTrace();\n" + |
14045 |
" local = null;\n" + |
14046 |
" }\n" + |
14047 |
" return local;\n" + |
14048 |
" }\n" + |
14049 |
"\n" + |
14050 |
" private Object loadEntry(File f, boolean b) throws IOException {\n" + |
14051 |
" throw new IOException();\n" + |
14052 |
" }\n" + |
14053 |
"}\n" |
14054 |
}, |
14055 |
""); |
14056 |
} |
14028 |
} |
14057 |
} |