diff options
author | Tor Norbye <tnorbye@google.com> | 2012-08-21 11:05:06 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-08-21 11:05:06 -0700 |
commit | 09407f74000f057774f85cfd414e86909022eca0 (patch) | |
tree | fc057bfad9e08910194a815f78f6417577d3934d /anttasks | |
parent | b008083756f23c40e7d3a8378afd0e2c5c27bf95 (diff) | |
download | sdk-09407f74000f057774f85cfd414e86909022eca0.zip sdk-09407f74000f057774f85cfd414e86909022eca0.tar.gz sdk-09407f74000f057774f85cfd414e86909022eca0.tar.bz2 |
Fix nullability annotations
Eclipse 3.8/4.2 requires that any method which overrides another
method with a @NonNull parameter (see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=381443).
This changeset adds @NonNull on various overriding methods in newly
added code such that Eclispe 4.2 doesn't show errors.
Change-Id: Ice4a4b4dc31ba68c4e0911bb37c15da090076a0d
Diffstat (limited to 'anttasks')
-rw-r--r-- | anttasks/src/com/android/ant/GetTargetTask.java | 7 | ||||
-rw-r--r-- | anttasks/src/com/android/ant/GetUiTargetTask.java | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/anttasks/src/com/android/ant/GetTargetTask.java b/anttasks/src/com/android/ant/GetTargetTask.java index 426b01b..d79ffee 100644 --- a/anttasks/src/com/android/ant/GetTargetTask.java +++ b/anttasks/src/com/android/ant/GetTargetTask.java @@ -17,6 +17,7 @@ package com.android.ant; import com.android.SdkConstants; +import com.android.annotations.NonNull; import com.android.sdklib.AndroidVersion; import com.android.sdklib.IAndroidTarget; import com.android.sdklib.IAndroidTarget.IOptionalLibrary; @@ -129,17 +130,17 @@ public class GetTargetTask extends Task { } @Override - public void info(String msgFormat, Object... args) { + public void info(@NonNull String msgFormat, Object... args) { messages.add(String.format(msgFormat, args)); } @Override - public void verbose(String msgFormat, Object... args) { + public void verbose(@NonNull String msgFormat, Object... args) { info(msgFormat, args); } @Override - public void warning(String warningFormat, Object... args) { + public void warning(@NonNull String warningFormat, Object... args) { messages.add(String.format("Warning: " + warningFormat, args)); } }); diff --git a/anttasks/src/com/android/ant/GetUiTargetTask.java b/anttasks/src/com/android/ant/GetUiTargetTask.java index 5c34fa1..e45d2bc 100644 --- a/anttasks/src/com/android/ant/GetUiTargetTask.java +++ b/anttasks/src/com/android/ant/GetUiTargetTask.java @@ -16,6 +16,7 @@ package com.android.ant; +import com.android.annotations.NonNull; import com.android.sdklib.IAndroidTarget; import com.android.sdklib.IAndroidTarget.IOptionalLibrary; import com.android.sdklib.SdkManager; @@ -78,17 +79,17 @@ public class GetUiTargetTask extends Task { } @Override - public void info(String msgFormat, Object... args) { + public void info(@NonNull String msgFormat, Object... args) { messages.add(String.format(msgFormat, args)); } @Override - public void verbose(String msgFormat, Object... args) { + public void verbose(@NonNull String msgFormat, Object... args) { info(msgFormat, args); } @Override - public void warning(String warningFormat, Object... args) { + public void warning(@NonNull String warningFormat, Object... args) { messages.add(String.format("Warning: " + warningFormat, args)); } }); |