|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2000, 2012 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2013 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 8-16
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> - Contribution for bug 185682 - Increment/decrement operators mark local variables as read |
10 |
* Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for bug 185682 - Increment/decrement operators mark local variables as read |
|
|
11 |
* Jesper Steen Moller <jesper@selskabet.org> - Contribution for bug 360045 - ProblemReporter.referenceContext is not reset on all paths |
| 11 |
*******************************************************************************/ |
12 |
*******************************************************************************/ |
| 12 |
package org.eclipse.jdt.core.tests.compiler.regression; |
13 |
package org.eclipse.jdt.core.tests.compiler.regression; |
| 13 |
|
14 |
|
|
|
15 |
import java.io.File; |
| 14 |
import java.util.Map; |
16 |
import java.util.Map; |
| 15 |
|
17 |
|
| 16 |
import junit.framework.Test; |
18 |
import junit.framework.Test; |
|
Lines 8880-8884
Link Here
|
| 8880 |
} |
8882 |
} |
| 8881 |
); |
8883 |
); |
| 8882 |
} |
8884 |
} |
|
|
8885 |
// ProblemReporter.referenceContext is not reset on all paths |
| 8886 |
public void testBug364045() { |
| 8887 |
String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test364045.jar"; |
| 8888 |
String[] defaultLibs = getDefaultClassPaths(); |
| 8889 |
int len = defaultLibs.length; |
| 8890 |
String[] libs = new String[len+1]; |
| 8891 |
System.arraycopy(defaultLibs, 0, libs, 0, len); |
| 8892 |
libs[len] = path; |
| 8893 |
|
| 8894 |
Map options = getCompilerOptions(); |
| 8895 |
options.put(CompilerOptions.OPTION_ReportInvalidJavadocTags, CompilerOptions.DISABLED); |
| 8896 |
|
| 8897 |
runNegativeTest( |
| 8898 |
new String[] { |
| 8899 |
"A.java", |
| 8900 |
" /**\n"+ |
| 8901 |
" * @dude\n" + |
| 8902 |
" */\n" + |
| 8903 |
"public class A {\n"+ |
| 8904 |
" public static aPackage.BadInterface ifc = null;/**\n"+ |
| 8905 |
" * @param\n" + |
| 8906 |
" */\n" + |
| 8907 |
" public void fine(Object bad) {\n" + |
| 8908 |
" // Boring!\n"+ |
| 8909 |
" };\n" + |
| 8910 |
" private Object data = ifc.badMethod(32,12);\n" + |
| 8911 |
" public void fleep(Object bad) {\n" + |
| 8912 |
" ((aPackage.BadInterface)bad).badMethod(1, 2, null, null);\n"+ |
| 8913 |
" };\n" + |
| 8914 |
"}\n" |
| 8915 |
}, |
| 8916 |
"----------\n" + |
| 8917 |
"1. ERROR in A.java (at line 0)\n" + |
| 8918 |
" /**\n" + |
| 8919 |
" ^\n" + |
| 8920 |
"The class file BadInterface contains a signature \'(hLjava/lang/Long;[FLaPackage/BadInterface;)LaPackage/BadInterface;\' ill-formed at position 1\n" + |
| 8921 |
"----------\n", |
| 8922 |
libs, |
| 8923 |
true, |
| 8924 |
options); |
| 8925 |
} |
| 8883 |
} |
8926 |
} |
| 8884 |
|
8927 |
|