Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2005, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2005, 2011 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 2196-2199
Link Here
|
2196 |
" X$1(X arg0, java.lang.Integer $anonymous0, java.lang.String... $anonymous1, java.lang.Float arg3);\n"; |
2196 |
" X$1(X arg0, java.lang.Integer $anonymous0, java.lang.String... $anonymous1, java.lang.Float arg3);\n"; |
2197 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X$1.class", "X$1", expectedOutput); |
2197 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X$1.class", "X$1", expectedOutput); |
2198 |
} |
2198 |
} |
|
|
2199 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=337093 |
2200 |
public void test063() { |
2201 |
Map options = getCompilerOptions(); |
2202 |
options.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation, CompilerOptions.DISABLED); |
2203 |
this.runNegativeTest( |
2204 |
new String[] { |
2205 |
"X.java", |
2206 |
"import java.util.Collection;\n" + |
2207 |
"import java.util.Iterator;\n" + |
2208 |
"public class X {\n" + |
2209 |
" public static class IteratorChain<T> implements Iterator<T> {\n" + |
2210 |
" public IteratorChain(Collection<? extends T> a, Collection<? extends T> b, Collection<? extends T> ... collections) {\n" + |
2211 |
" }\n" + |
2212 |
" public boolean hasNext() {\n" + |
2213 |
" return false;\n" + |
2214 |
" }\n" + |
2215 |
" public T next() {\n" + |
2216 |
" return null;\n" + |
2217 |
" }\n" + |
2218 |
" public void remove() {\n" + |
2219 |
" throw new UnsupportedOperationException();\n" + |
2220 |
" }\n" + |
2221 |
" }\n" + |
2222 |
" public static void main(String[] args) {\n" + |
2223 |
" new IteratorChain<Number>(null, null);\n" + |
2224 |
" }\n" + |
2225 |
"}\n", // ================= |
2226 |
}, |
2227 |
"----------\n" + |
2228 |
"1. WARNING in X.java (at line 18)\n" + |
2229 |
" new IteratorChain<Number>(null, null);\n" + |
2230 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
2231 |
"Type safety : A generic array of Collection<? extends Number> is created for a varargs parameter\n" + |
2232 |
"----------\n", |
2233 |
null, |
2234 |
true, |
2235 |
options); |
2236 |
} |
2199 |
} |
2237 |
} |