[Git][java-team/jakarta-annotation-api][master] 5 commits: New upstream version 2.1.0

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Wed Dec 7 22:26:46 GMT 2022



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / jakarta-annotation-api


Commits:
7a08c39f by Emmanuel Bourg at 2022-12-07T23:14:56+01:00
New upstream version 2.1.0
- - - - -
bd16ee4e by Emmanuel Bourg at 2022-12-07T23:15:04+01:00
New upstream version 2.1.1
- - - - -
fa9bc4e0 by Emmanuel Bourg at 2022-12-07T23:15:31+01:00
Standards-Version updated to 4.6.1

- - - - -
7c6f597a by Emmanuel Bourg at 2022-12-07T23:15:37+01:00
Merge tag 'upstream/2.1.1'

Upstream version 2.1.1

- - - - -
8ada99da by Emmanuel Bourg at 2022-12-07T23:18:57+01:00
New upstream release (2.1.1)

- - - - -


15 changed files:

- README.md
- api/pom.xml
- api/src/main/java/jakarta/annotation/ManagedBean.java
- + api/src/main/java/jakarta/annotation/Nonnull.java
- + api/src/main/java/jakarta/annotation/Nullable.java
- api/src/main/java/jakarta/annotation/PostConstruct.java
- api/src/main/java/jakarta/annotation/PreDestroy.java
- api/src/main/java/jakarta/annotation/Priority.java
- api/src/main/java/jakarta/annotation/sql/DataSourceDefinition.java
- debian/changelog
- debian/control
- spec/pom.xml
- spec/src/main/asciidoc/annotations-spec.adoc
- spec/src/main/asciidoc/license-efsl.adoc
- spec/src/main/asciidoc/spec.adoc


Changes:

=====================================
README.md
=====================================
@@ -4,7 +4,5 @@
 semantic concepts that enable a declarative style of programming that applies
 across a variety of Java technologies.
 
-This standalone release of Jakarta Annotations uses a
-[Java Platform Module System](http://openjdk.java.net/projects/jigsaw/spec/)
-"automatic" module name of `java.annotation`, to match the module name
-used in JDK 9.  A future version will include full module metadata.
+Jakarta Annotations uses a [Java Platform Module System](http://openjdk.java.net/projects/jigsaw/spec/)
+module name `jakarta.annotation`.


=====================================
api/pom.xml
=====================================
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -23,13 +23,13 @@
     <parent>
         <groupId>org.eclipse.ee4j</groupId>
         <artifactId>project</artifactId>
-        <version>1.0.6</version>
+        <version>1.0.7</version>
         <relativePath/>
     </parent>
 
     <groupId>jakarta.annotation</groupId>
     <artifactId>jakarta.annotation-api</artifactId>
-    <version>2.0.0</version>
+    <version>2.1.1</version>
 
     <name>Jakarta Annotations API</name>
     <description>Jakarta Annotations API</description>
@@ -43,6 +43,10 @@
             <name>Linda De Michiel</name>
             <organization>Oracle Corp.</organization>
         </developer>
+        <developer>
+            <name>Dmitry Kornilov</name>
+            <organization>Oracle Corp.</organization>
+        </developer>
     </developers>
 
     <licenses>
@@ -89,7 +93,7 @@
         <spotbugs.version>4.0.4</spotbugs.version>
 
         <non.final>false</non.final>
-        <spec.version>2.0</spec.version>
+        <spec.version>2.1</spec.version>
         <extension.name>jakarta.annotation</extension.name>
         <vendor.name>Eclipse Foundation</vendor.name>
         <implementation.vendor.id>org.glassfish</implementation.vendor.id>
@@ -337,11 +341,12 @@
                     <release>11</release>
                     <additionalOptions>--add-modules java.sql</additionalOptions>
                     <notimestamp>true</notimestamp>
+                    <nosince>true</nosince>
                     <docfilessubdirs>true</docfilessubdirs>
                     <doctitle>Jakarta Annotations ${project.version} API Specification</doctitle>
                     <header><![CDATA[<br>Jakarta Annotations API v${project.version}]]></header>
                     <bottom><![CDATA[
-                    Copyright © 2019, 2020 Eclipse Foundation. All rights reserved.<br>
+                    Copyright © 2019, 2021 Eclipse Foundation. All rights reserved.<br>
                     Use is subject to <a href="{@docRoot}/doc-files/EFSL.html" target="_top">license terms</a>.]]>
                     </bottom>
                 </configuration>


=====================================
api/src/main/java/jakarta/annotation/ManagedBean.java
=====================================
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2022 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v. 2.0, which is available at
@@ -26,19 +26,21 @@ import static java.lang.annotation.RetentionPolicy.*;
  * such as resource injection, lifecycle callbacks and interceptors.
  *
  * @since Common Annotations 1.1
+ * @deprecated This will be removed post Jakarta EE 10 and should be replaced with CDI beans
  */
 @Target(TYPE)
 @Retention(RUNTIME)
+ at Deprecated(/*since = "2.1.1", forRemoval = true*/)
 public @interface ManagedBean {
     /**
-     * The name of the Managed Bean. Managed Bean names must be unique within a
-     * Jakarta EE module. For each named Managed Bean, Java EE containers must make
+     * The name of the Jakarta Managed Bean. Jakarta Managed Bean names must be unique within a
+     * Jakarta EE module. For each named Jakarta Managed Bean, Jakarta EE containers must make
      * available the following entries in JNDI, using the same naming scheme used
-     * for EJB components.
+     * for Jakarta Enterprise Beans components.
      * <p>
      * In the application namespace: <p>
      * java:app/<module-name>/<bean-name> <p>
-     * In the module namespace of the module containing the Managed Bean:
+     * In the module namespace of the module containing the Jakarta Managed Bean:
      * <p> java:module/<bean-name>
      *
      */


=====================================
api/src/main/java/jakarta/annotation/Nonnull.java
=====================================
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jakarta.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * The annotated element must not be null.
+ * <p>
+ * Annotated fields must not be null after construction has completed.
+ * <p>
+ * When this annotation is applied to a method it applies to the method return value.
+ *
+ * @see jakarta.annotation.Nullable
+ * @since 2.0
+ */
+ at Documented
+ at Retention(RUNTIME)
+public @interface Nonnull {
+}


=====================================
api/src/main/java/jakarta/annotation/Nullable.java
=====================================
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+package jakarta.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * The annotated element could be null under some circumstances.
+ * <p>
+ * In general, this means developers will have to read the documentation to
+ * determine when a null value is acceptable and whether it is necessary to
+ * check for a null value.
+ * <p>
+ * This annotation is useful mostly for overriding a {@link Nonnull} annotation.
+ * Static analysis tools should generally treat the annotated items as though they
+ * had no annotation, unless they are configured to minimize false negatives.
+ * <p>
+ * When this annotation is applied to a method it applies to the method return value.
+ *
+ * @see jakarta.annotation.Nonnull
+ * @since 2.0
+ */
+ at Documented
+ at Retention(RUNTIME)
+public @interface Nullable {
+}


=====================================
api/src/main/java/jakarta/annotation/PostConstruct.java
=====================================
@@ -34,7 +34,7 @@ import static java.lang.annotation.RetentionPolicy.*;
  * <ul>
  * <li>The method must not have any parameters except in the case of 
  * interceptors in which case it takes an <code>InvocationContext</code>
- * object as defined by the Interceptors specification.</li>
+ * object as defined by the Jakarta Interceptors specification.</li>
  * <li>The method defined on an interceptor class or superclass of an
  * interceptor class must have one of the following signatures:
  * <p>


=====================================
api/src/main/java/jakarta/annotation/PreDestroy.java
=====================================
@@ -33,7 +33,7 @@ import static java.lang.annotation.RetentionPolicy.*;
  * <ul>
  * <li>The method must not have any parameters except in the case of
  * interceptors in which case it takes an <code>InvocationContext</code>
- * object as defined by the Interceptors specification.</li>
+ * object as defined by the Jakarta Interceptors specification.</li>
  * <li>The method defined on an interceptor class or superclass of an
  * interceptor class must have one of the following signatures:
  * <p>


=====================================
api/src/main/java/jakarta/annotation/Priority.java
=====================================
@@ -21,13 +21,13 @@ import static java.lang.annotation.ElementType.*;
 import static java.lang.annotation.RetentionPolicy.*;
 
 /**
- * The <code>Priority</code> annotation can be applied to classes 
- * or parameters to indicate in what order they should be used.  
+ * The <code>Priority</code> annotation can be applied to any program elements
+ * to indicate in what order they should be used.
  * The effect of using the <code>Priority</code> annotation in
  * any particular instance is defined by other specifications that 
  * define the use of a specific class.
  * <p>
- * For example, the Interceptors specification defines the use of
+ * For example, the Jakarta Interceptors specification defines the use of
  * priorities on interceptors to control the order in which
  * interceptors are called.</p>
  * <p>
@@ -39,7 +39,6 @@ import static java.lang.annotation.RetentionPolicy.*;
  *
  * @since Common Annotations 1.2
  */
- at Target({TYPE,PARAMETER})
 @Retention(RUNTIME)
 @Documented
 public @interface Priority {


=====================================
api/src/main/java/jakarta/annotation/sql/DataSourceDefinition.java
=====================================
@@ -126,7 +126,7 @@ import java.lang.annotation.RetentionPolicy;
  * )
  * </pre>
  * <p>
- * An example lookup of the DataSource from an EJB:
+ * An example lookup of the DataSource from an Jakarta Enterprise Beans:
  * <pre>
  * @Stateless
  * public class MyStatelessEJB {


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+jakarta-annotation-api (2.1.1-1) unstable; urgency=medium
+
+  * New upstream release
+  * Standards-Version updated to 4.6.1
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Wed, 07 Dec 2022 23:18:47 +0100
+
 jakarta-annotation-api (2.0.0-1) unstable; urgency=medium
 
   * New upstream release


=====================================
debian/control
=====================================
@@ -10,7 +10,7 @@ Build-Depends:
  libmaven-bundle-plugin-java (>= 3.5.1),
  libmaven-javadoc-plugin-java (>= 3.0.1),
  maven-debian-helper (>= 2.1)
-Standards-Version: 4.5.0
+Standards-Version: 4.6.1
 Vcs-Git: https://salsa.debian.org/java-team/jakarta-annotation-api.git
 Vcs-Browser: https://salsa.debian.org/java-team/jakarta-annotation-api
 Homepage: https://projects.eclipse.org/projects/ee4j.ca


=====================================
spec/pom.xml
=====================================
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2019, 2020 Contributors to the Eclipse Foundation.
+    Copyright (c) 2019, 2021 Contributors to the Eclipse Foundation.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -21,13 +21,13 @@
     <parent>
         <groupId>org.eclipse.ee4j</groupId>
         <artifactId>project</artifactId>
-        <version>1.0.6</version>
+        <version>1.0.7</version>
         <relativePath/>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>annotations-spec</artifactId>
-    <version>2.0-SNAPSHOT</version>
+    <version>2.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>Jakarta Annotations Specification</name>
@@ -38,8 +38,8 @@
     <properties>
         <site.output.dir>${project.build.directory}/staging</site.output.dir>
         <maven.site.skip>true</maven.site.skip>
-        <asciidoctor.maven.plugin.version>2.0.0</asciidoctor.maven.plugin.version>
-        <asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
+        <asciidoctor.maven.plugin.version>2.2.1</asciidoctor.maven.plugin.version>
+        <asciidoctorj.pdf.version>1.6.0</asciidoctorj.pdf.version>
         <!-- status: DRAFT, BETA, etc., or blank for final -->
         <status>DRAFT</status>
         <maven.build.timestamp.format>MMMM dd, yyyy</maven.build.timestamp.format>


=====================================
spec/src/main/asciidoc/annotations-spec.adoc
=====================================
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2017, 2020 Contributors to the Eclipse Foundation
+// Copyright (c) 2017, 2021 Contributors to the Eclipse Foundation
 //
 
 = Jakarta Annotations


=====================================
spec/src/main/asciidoc/license-efsl.adoc
=====================================
@@ -13,7 +13,7 @@ endif::[]
 
 Release: {revdate}
 ....
-Copyright (c) 2020 Eclipse Foundation.
+Copyright (c) 2021 Eclipse Foundation.
 
 === Eclipse Foundation Specification License
 


=====================================
spec/src/main/asciidoc/spec.adoc
=====================================
@@ -228,7 +228,7 @@ the guidelines specified for annotations and inheritance:
 |===
 |Methods in derived classes |Effective TransactionAttribute value
 |foo() in ABean
-|TransactionAttribute(REQUIRED). (Default TransactionAttribute as defined by the EJB specification).
+|TransactionAttribute(REQUIRED). (Default TransactionAttribute as defined by the Jakarta Enterprise Beans specification).
 |bar() in ABean
 |TransactionAttribute(REQUIRED)
 |foo() in BBean
@@ -249,7 +249,7 @@ the guidelines specified for annotations and inheritance:
 |TransactionAttribute(REQUIRED) (from Base class)
 |===
 
-For more details about the _TransactionAttribute_ annotation, see the _EJB 3 Core Contracts_
+For more details about the _TransactionAttribute_ annotation, see the _Jakarta Enterprise Beans Core Contracts_
 specification.
 
 All annotations defined in this specification
@@ -494,7 +494,7 @@ In the example above the name is _customerDB_
 and the type is _javax.sql.DataSource.class_ .
 
 The table below shows the mapping from Java
-type to the equivalent resource type in the Java EE 5 (and later)
+type to the equivalent resource type in the Jakarta EE 9 (and later)
 deployment descriptors:
 
 [options="header"]
@@ -509,7 +509,6 @@ deployment descriptors:
 |java.lang.Short |env-entry
 |java.lang.Long |env-entry
 |java.lang.Float |env-entry
-|jakarta.xml.rpc.Service |service-ref
 |jakarta.xml.ws.Service |service-ref
 |jakarta.jws.WebService |service-ref
 |javax.sql.DataSource |resource-ref
@@ -519,7 +518,6 @@ deployment descriptors:
 |jakarta.mail.Session |resource-ref
 |java.net.URL |resource-ref
 |jakarta.resource.cci.ConnectionFactory |resource-ref
-|org.omg.CORBA_2_3.ORB |resource-ref
 |any other connection factory defined by a resource adapter |resource-ref
 |jakarta.jms.Queue |message-destination-ref
 |jakarta.jms.Topic |message-destination-ref
@@ -579,7 +577,7 @@ resources to be injected. Only one method in a given class can be
 annotated with this annotation. The method on which the _PostConstruct_
 annotation is applied MUST fulfill all of the following requirements,
 except in cases where these requirements have been relaxed by another
-specification. See in particular the _Interceptors_ specification.
+specification. See in particular the _Jakarta Interceptors_ specification.
 
 - The method MUST NOT have any para meters.
 
@@ -643,7 +641,7 @@ managed objects that support _PostConstruct_ except the application
 client. The method on which the _PreDestroy_ annotation is applied MUST
 fulfill all of the following requirements, except in cases where these
 requirements have been relaxed by another specification. See in
-particular the _Interceptors_ specification.
+particular the _Jakarta Interceptors_ specification.
 
 - The method MUST NOT have any para meters.
 
@@ -704,11 +702,11 @@ private Connection connection;
 === jakarta.annotation.Priority
 
 The _Priority_ annotation can be applied to
-classes or parameters to indicate in what order they should be used. The
+any program elements to indicate in what order they should be used. The
 effect of using the _Priority_ annotation in any particular instance is
 defined by other specifications that define the use of a specific class.
 
-For example, the _Interceptors_ specification
+For example, the _Jakarta Interceptors_ specification
 defines the use of priorities on interceptors to control the order in
 which interceptors are called.
 
@@ -726,7 +724,6 @@ import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 import static java.lang.annotation.RetentionPolicy.*;
 
- at Target({TYPE, PARAMETER})
 @Retention(RUNTIME)
 @Documented
 public @interface Priority {
@@ -735,6 +732,83 @@ public @interface Priority {
 }
 ----
 
+=== jakarta.annotation.Nonnull
+
+The _Nonnull_ annotation is used to mark
+elements that cannot be `null`.
+
+This information can be used for validation by IDEs, static analysis tools, and runtime.
+
+The annotation may be present on any target.
+This specification defines behavior on following targets:
+
+- Method -  return type will never be `null`
+- Parameter - parameter must not be `null`
+- Field - field cannot be `null` after construction of the object is completed
+
+[source,java]
+----
+package jakarta.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Documented
+ at Retention(RUNTIME)
+public @interface Nonnull {
+}
+----
+
+The following example shows the usage of the annotation defined above:
+
+[source,java]
+----
+public interface StockQuoteService {
+    @Nonnull
+    BigDecimal quote(@Nonnull String marker);
+}
+----
+
+=== jakarta.annotation.Nullable
+
+The _Nullable_ annotation is used to mark
+elements that may be `null`.
+
+This information can be used for validation by IDEs, static analysis tools, and runtime.
+
+The annotation may be present on any target.
+This specification defines behavior on following targets:
+
+- Method -  return type may be `null`
+- Parameter - parameter may be `null`
+- Field - field may be `null`
+
+[source,java]
+----
+package jakarta.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+ at Documented
+ at Retention(RUNTIME)
+public @interface Nullable {
+}
+----
+
+The following example shows the usage of the annotation defined above:
+
+[source,java]
+----
+public interface StockQuoteService {
+    BigDecimal quote(String marker, @Nullable BigDecimal defaultValue);
+}
+----
+
 === jakarta.annotation.security.RunAs
 
 The _RunAs_ annotation defines the security
@@ -1139,10 +1213,10 @@ public class CalculatorBean {
 === jakarta.annotation.ManagedBean
 
 The _ManagedBean_ annotation is used to
-declare a Managed Bean as specified in the _Managed Beans_
-specification. Managed Beans are container-managed objects that support
+declare a Jakarta Managed Bean as specified in the _Jakarta Managed Beans_
+specification. Jakarta Managed Beans are container-managed objects that support
 a small set of basic services such as resource injection, lifecycle
-callbacks and interceptors. A Managed Bean may optionally have a name, a
+callbacks and interceptors. A Jakarta Managed Bean may optionally have a name, a
 _String_ specified via the _value_ element.
 
 [source,java]
@@ -1161,7 +1235,7 @@ public @interface ManagedBean {
 
 |===
 |Element |Description |Default
-|value |Name of the Managed Bean |""
+|value |Name of the Jakarta Managed Bean |""
 |===
 
 Examples:
@@ -1179,20 +1253,20 @@ public class ShoppingCart {
 JSR 175: A Metadata Facility for the Java
 Programming Language. http://jcp.org/en/jsr/detail?id=175
 
-Java Platform, Enterprise Edition, v7 (Java
-EE). http://jcp.org/en/jsr/detail?id=342
+Jakarta EE Platform 9 (Jakarta EE).
+https://jakarta.ee/specifications/platform/9/
 
 Java 2 Platform, Standard Edition, v5.0
-(J2SE). http://java.sun.com/j2se
+(J2SE). https://www.oracle.com/java/technologies/javase/j2se-v50.html
 
-Enterprise JavaBeans, v3.2 (EJB).
-http://jcp.org/en/jsr/detail?id=345
+Jakarta Enterprise Beans, v4.0.
+https://jakarta.ee/specifications/enterprise-beans/4.0
 
-Interceptors, 1.2.
-http://jcp.org/en/jsr/detail?id=318
+Jakarta Interceptors, 2.0.
+https://jakarta.ee/specifications/interceptors/2.0/
 
-Managed Beans.
-http://jcp.org/en/jsr/detail?id=316
+Jakarta Managed Beans.
+https://jakarta.ee/specifications/managedbeans/2.0/
 
 RFC 2119.
 http://www.faqs.org/rfcs/rfc2119.html



View it on GitLab: https://salsa.debian.org/java-team/jakarta-annotation-api/-/compare/a18899bf39bb5dea05aba369685f0afbcab1205c...8ada99daa16de40dd4df13ec1c2c603c31d28974

-- 
View it on GitLab: https://salsa.debian.org/java-team/jakarta-annotation-api/-/compare/a18899bf39bb5dea05aba369685f0afbcab1205c...8ada99daa16de40dd4df13ec1c2c603c31d28974
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20221207/77bc0e89/attachment.htm>


More information about the pkg-java-commits mailing list