aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/com/android
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-08-21 11:05:06 -0700
committerTor Norbye <tnorbye@google.com>2012-08-21 11:05:06 -0700
commit09407f74000f057774f85cfd414e86909022eca0 (patch)
treefc057bfad9e08910194a815f78f6417577d3934d /common/src/com/android
parentb008083756f23c40e7d3a8378afd0e2c5c27bf95 (diff)
downloadsdk-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 'common/src/com/android')
-rw-r--r--common/src/com/android/utils/ILogger.java2
-rw-r--r--common/src/com/android/utils/NullLogger.java8
2 files changed, 6 insertions, 4 deletions
diff --git a/common/src/com/android/utils/ILogger.java b/common/src/com/android/utils/ILogger.java
index df3a636..7df5d10 100644
--- a/common/src/com/android/utils/ILogger.java
+++ b/common/src/com/android/utils/ILogger.java
@@ -72,6 +72,6 @@ public interface ILogger {
* @param msgFormat is a string format to be used with a {@link Formatter}. Cannot be null.
* @param args provides the arguments for msgFormat.
*/
- void verbose(String msgFormat, Object... args);
+ void verbose(@NonNull String msgFormat, Object... args);
}
diff --git a/common/src/com/android/utils/NullLogger.java b/common/src/com/android/utils/NullLogger.java
index 77f1ad5..8b1a3d9 100644
--- a/common/src/com/android/utils/NullLogger.java
+++ b/common/src/com/android/utils/NullLogger.java
@@ -16,6 +16,8 @@
package com.android.utils;
+import com.android.annotations.NonNull;
+
/**
* Dummy implementation of an {@link ILogger}.
* <p/>
@@ -35,17 +37,17 @@ public class NullLogger implements ILogger {
}
@Override
- public void warning(String warningFormat, Object... args) {
+ public void warning(@NonNull String warningFormat, Object... args) {
// ignore
}
@Override
- public void info(String msgFormat, Object... args) {
+ public void info(@NonNull String msgFormat, Object... args) {
// ignore
}
@Override
- public void verbose(String msgFormat, Object... args) {
+ public void verbose(@NonNull String msgFormat, Object... args) {
// ignore
}