aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-05-30 14:54:39 -0700
committerTor Norbye <tnorbye@google.com>2012-05-30 17:25:18 -0700
commit7e4b8e9d595e45baa9d87cdb8282f02759e73abc (patch)
tree2da5fccd6c1e00c972c69323e3cf10df2e5ab264 /eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java
parent5ee7da2ae31dcbe781ed81c07f31b31d0a0a7d7f (diff)
downloadsdk-7e4b8e9d595e45baa9d87cdb8282f02759e73abc.zip
sdk-7e4b8e9d595e45baa9d87cdb8282f02759e73abc.tar.gz
sdk-7e4b8e9d595e45baa9d87cdb8282f02759e73abc.tar.bz2
Fix nullness annotations
Eclipse 4.2 includes analysis support for @Nullable and @NonNull annotations. However, it requires these annotations to be *repeated* on every single method implementing or overriding a superclass or interface method (!). This changeset basically applies the quickfixes to inline these annotations. It also changes the retention of our nullness annotations from source to class, since without this Eclipse believes that a @NonNull annotation downstream is a redefinition of a @Nullable annotation. Finally, the null analysis revealed a dozen or so places where the nullness annotation was either wrong, or some null checking on parameters or return values needed to be done. Change-Id: I43b4e56e2d025a8a4c92a8873f55c13cdbc4c1cb
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java
index c65dec9..7c26859 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java
@@ -16,9 +16,10 @@
package com.android.ide.common.layout;
-import static com.android.util.XmlUtils.ANDROID_URI;
import static com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH;
+import static com.android.util.XmlUtils.ANDROID_URI;
+import com.android.annotations.NonNull;
import com.android.ide.common.api.INode;
import com.android.ide.common.api.IViewRule;
import com.android.ide.common.api.InsertType;
@@ -29,7 +30,8 @@ import com.android.ide.common.api.InsertType;
public class SeekBarRule extends BaseViewRule {
@Override
- public void onCreate(INode node, INode parent, InsertType insertType) {
+ public void onCreate(@NonNull INode node, @NonNull INode parent,
+ @NonNull InsertType insertType) {
super.onCreate(node, parent, insertType);
// A SeekBar isn't useful with wrap_content because it packs itself down to