aboutsummaryrefslogtreecommitdiffstats
path: root/lint/libs/lint_api
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-12-20 20:20:24 -0800
committerTor Norbye <tnorbye@google.com>2011-12-21 13:36:23 -0800
commitab36f4e7488358dea4ab6b54ee2b7bef3da0232b (patch)
treee6846336e35cd0fb29addf962c9031c68492ed30 /lint/libs/lint_api
parent4ae7075d188a35298d834bfcd0500b77b08a12ab (diff)
downloadsdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.zip
sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.tar.gz
sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.tar.bz2
Update SDK codebase to JDK 6
This changeset makes the SDK codebase compile with source=1.6 (which means it also requires JDK 6). This means that methods implementing an interface requires @Override's. It also means we can start using APIs like the ArrayDeque class and methods like String#isEmpty(). This changeset looks big but the change is trivial: it's basically adding @Override in all the places that need it, along with some other automatic Eclipse cleanup in certain files (such as reordering imports where they were incorrectly ordered (because older versions of Eclipse didn't always handle inner classes right)), as well as cleaning up trailing whitespace and removing some $NON-NLS-1$ markers on lines where there aren't any string literals anymore. This changeset also sets the source and target JDK level to 6 in the Eclipse compiler .settings file, and synchronizes this file to all the other Eclipse SDK projects. Change-Id: I6a9585aa44c3dee9a5c00739ab22fbdbcb9f8275
Diffstat (limited to 'lint/libs/lint_api')
-rw-r--r--lint/libs/lint_api/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--lint/libs/lint_api/src/com/android/tools/lint/detector/api/Category.java1
-rw-r--r--lint/libs/lint_api/src/com/android/tools/lint/detector/api/Issue.java1
-rw-r--r--lint/libs/lint_api/src/com/android/tools/lint/detector/api/Location.java1
4 files changed, 14 insertions, 1 deletions
diff --git a/lint/libs/lint_api/.settings/org.eclipse.jdt.core.prefs b/lint/libs/lint_api/.settings/org.eclipse.jdt.core.prefs
index e755df2..9c7cb00 100644
--- a/lint/libs/lint_api/.settings/org.eclipse.jdt.core.prefs
+++ b/lint/libs/lint_api/.settings/org.eclipse.jdt.core.prefs
@@ -1,6 +1,14 @@
-#Thu Jun 09 12:26:44 PDT 2011
+#Tue Dec 20 16:31:10 PST 2011
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -9,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -69,3 +78,4 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Category.java b/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Category.java
index 6713a7f..5ab0940 100644
--- a/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Category.java
+++ b/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Category.java
@@ -112,6 +112,7 @@ public final class Category implements Comparable<Category> {
}
}
+ @Override
public int compareTo(Category other) {
if (other.mPriority == mPriority) {
if (mParent == other) {
diff --git a/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Issue.java b/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Issue.java
index 5c1dd48..fd1ae3d 100644
--- a/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Issue.java
+++ b/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Issue.java
@@ -192,6 +192,7 @@ public final class Issue implements Comparable<Issue> {
*
* @param other the {@link Issue} to compare this issue to
*/
+ @Override
public int compareTo(Issue other) {
return getId().compareTo(other.getId());
}
diff --git a/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Location.java b/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Location.java
index 10f1d6b..da79244 100644
--- a/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Location.java
+++ b/lint/libs/lint_api/src/com/android/tools/lint/detector/api/Location.java
@@ -308,6 +308,7 @@ public class Location {
mEndOffset = endOffset;
}
+ @Override
public Location resolve() {
return Location.create(mFile, mContents, mStartOffset, mEndOffset);
}