Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2013-08-15 16:54:38 +0000
committerStephan Herrmann2013-08-15 16:54:38 +0000
commit6e45c3b12d66a6d00320490b98ad7820ecc63934 (patch)
tree006bc4de3cb96b53579683e4d73b6662b193dd28 /org.eclipse.jdt.annotation
parent49894ec43e425d82d6841fb37405b9e39799b63c (diff)
downloadeclipse.jdt.core-6e45c3b12d66a6d00320490b98ad7820ecc63934.tar.gz
eclipse.jdt.core-6e45c3b12d66a6d00320490b98ad7820ecc63934.tar.xz
eclipse.jdt.core-6e45c3b12d66a6d00320490b98ad7820ecc63934.zip
Bug 414444 - [1.8][null] Configure null annotation bundle for 1.8
(TYPE_USE) - split annotation bundle, but cannot yet use BREE JavaSE-1.8
Diffstat (limited to 'org.eclipse.jdt.annotation')
-rw-r--r--org.eclipse.jdt.annotation/.classpath2
-rw-r--r--org.eclipse.jdt.annotation/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.jdt.annotation/pom.xml2
-rw-r--r--org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/NonNull.java23
-rw-r--r--org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/Nullable.java27
5 files changed, 30 insertions, 28 deletions
diff --git a/org.eclipse.jdt.annotation/.classpath b/org.eclipse.jdt.annotation/.classpath
index 304e86186a..70a0085c60 100644
--- a/org.eclipse.jdt.annotation/.classpath
+++ b/org.eclipse.jdt.annotation/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.annotation/META-INF/MANIFEST.MF b/org.eclipse.jdt.annotation/META-INF/MANIFEST.MF
index e215be5557..796defb13f 100644
--- a/org.eclipse.jdt.annotation/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.annotation/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-Localization: bundle
Bundle-SymbolicName: org.eclipse.jdt.annotation
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Export-Package: org.eclipse.jdt.annotation
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-Vendor: %providerName
diff --git a/org.eclipse.jdt.annotation/pom.xml b/org.eclipse.jdt.annotation/pom.xml
index 4b4a914b0b..e6a8e33fa7 100644
--- a/org.eclipse.jdt.annotation/pom.xml
+++ b/org.eclipse.jdt.annotation/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.annotation</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/NonNull.java b/org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/NonNull.java
index 047409d3ed..4ed4d3bdbf 100644
--- a/org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/NonNull.java
+++ b/org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/NonNull.java
@@ -5,16 +5,17 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
* Contributors:
* Stephan Herrmann - initial API and implementation
* IBM Corporation - bug fixes
*******************************************************************************/
package org.eclipse.jdt.annotation;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE_USE;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
@@ -22,14 +23,14 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Qualifier for a type in a method signature or a local variable declaration:
- * The entity (return value, parameter, field, local variable) whose type has this
- * annotation can never have the value <code>null</code> at runtime.
+ * Qualifier for a reference type in a {@link TYPE_USE} position:
+ * The type that has this annotation is intended to not include the value <code>null</code>.
* <p>
- * This has two consequences:
+ * If annotation based null analysis is enabled using this annotation has two consequences:
* <ol>
- * <li>Dereferencing the entity is safe, i.e., no <code>NullPointerException</code> can occur at runtime.</li>
- * <li>An attempt to bind a <code>null</code> value to the entity is a compile time error.</li>
+ * <li>Dereferencing an expression of this type is safe, i.e., no <code>NullPointerException</code> can occur at runtime.</li>
+ * <li>An attempt to bind a <code>null</code> value to an entity (field, local variable, method parameter or method return value)
+ * of this type is a compile time error.</li>
* </ol>
* For the second case, diagnostics issued by the compiler should distinguish three situations:
* <ol>
@@ -45,7 +46,7 @@ import java.lang.annotation.Target;
*/
@Documented
@Retention(RetentionPolicy.CLASS)
-@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })
+@Target({ TYPE_USE })
public @interface NonNull {
// marker annotation with no members
}
diff --git a/org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/Nullable.java b/org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/Nullable.java
index 68d6f53fb1..1929b0768e 100644
--- a/org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/Nullable.java
+++ b/org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/Nullable.java
@@ -5,16 +5,17 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
* Contributors:
* Stephan Herrmann - initial API and implementation
* IBM Corporation - bug fixes
*******************************************************************************/
package org.eclipse.jdt.annotation;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE_USE;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
@@ -22,21 +23,21 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Qualifier for a type in a method signature or a local variable declaration:
- * The entity (return value, parameter, field, local variable) whose type has this
- * annotation is allowed to have the value <code>null</code> at runtime.
+ * Qualifier for a reference type in a {@link TYPE_USE} position:
+ * The type that has this annotation explicitly includes the value <code>null</code>.
* <p>
- * This has two consequences:
- * <ul>
- * <li>Binding a <code>null</code> value to the entity is legal.</li>
- * <li>Dereferencing the entity is unsafe, i.e., a <code>NullPointerException</code> can occur at runtime.</li>
- * </ul>
+ * If annotation based null analysis is enabled using this annotation has two consequences:
+ * <ol>
+ * <li>Binding a <code>null</code> value to an entity (field, local variable, method parameter or method return value)
+ * of this type is legal.</li>
+ * <li>Dereferencing an expression of this type is unsafe, i.e., a <code>NullPointerException</code> can occur at runtime.</li>
+ * </ol>
* </p>
* @since 1.0
*/
@Documented
@Retention(RetentionPolicy.CLASS)
-@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })
+@Target({ TYPE_USE })
public @interface Nullable {
// marker annotation with no members
} \ No newline at end of file

Back to the top