summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2013-01-22 05:17:22 (EST)
committer Markus Keller2013-01-22 05:17:22 (EST)
commit5f0b41f0164318b11e29d8d3ce49257248d5f6d1 (patch)
treef0dd309dbf8aae3764ca3eefd26458910a008481
parent0fcc8cb5b2c36e93fdf48c4922337eff4f5d9ac3 (diff)
downloadeclipse.jdt.ui-5f0b41f0164318b11e29d8d3ce49257248d5f6d1.zip
eclipse.jdt.ui-5f0b41f0164318b11e29d8d3ce49257248d5f6d1.tar.gz
eclipse.jdt.ui-5f0b41f0164318b11e29d8d3ce49257248d5f6d1.tar.bz2
Bug 398211: UI changes for bug 381443 (@NonNull parameter not annotated in overriding method)v20130122-101722
-rw-r--r--org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/NullAnnotationsQuickFixTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/NullAnnotationsQuickFixTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/NullAnnotationsQuickFixTest.java
index 8a5fe95..9725b96 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/NullAnnotationsQuickFixTest.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/NullAnnotationsQuickFixTest.java
@@ -342,9 +342,9 @@ public class NullAnnotationsQuickFixTest extends QuickFixTest {
// Attempt to override a @NonNull argument with an unspec'ed argument
// -> change to @NonNull
- // TODO(stephan): here the underlying error is actually debatable / not necessary.
- // @NonNull -> unspec'ed could be seen as safe contravariant overriding
public void testChangeParameter3c() throws Exception {
+ // quickfix only offered with this warning enabled, but no need to say, because default is already "warning"
+// this.fJProject1.setOption(JavaCore.COMPILER_PB_NONNULL_PARAMETER_ANNOTATION_DROPPED, JavaCore.WARNING);
IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
StringBuffer buf= new StringBuffer();
buf.append("package test1;\n");
@@ -366,7 +366,7 @@ public class NullAnnotationsQuickFixTest extends QuickFixTest {
CompilationUnit astRoot= getASTRoot(cu);
ArrayList proposals= collectCorrections(cu, astRoot);
- assertNumberOfProposals(proposals, 1);
+ assertNumberOfProposals(proposals, 3); // one real change plus two @SuppressWarnings proposals
CUCorrectionProposal proposal= (CUCorrectionProposal)proposals.get(0);
String preview= getPreviewContent(proposal);