You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/10/06 09:31:22 UTC

[tomcat] branch 9.0.x updated (b8a0625 -> 3d7c17f)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


    from b8a0625  Update FailedRequestFilter's javadoc
     new 859b2b9  Added Javadoc comments for Java 15
     new 92289a8  Added Javadoc comments for Java 15
     new 3d7c17f  Add remaining Javadoc for the Annotations API

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/javax/annotation/Generated.java               | 10 +++
 java/javax/annotation/ManagedBean.java             |  3 +
 java/javax/annotation/Priority.java                |  4 ++
 java/javax/annotation/Resource.java                | 32 ++++++++++
 java/javax/annotation/Resources.java               |  4 ++
 java/javax/annotation/security/DeclareRoles.java   |  4 ++
 java/javax/annotation/security/RolesAllowed.java   |  4 ++
 java/javax/annotation/security/RunAs.java          |  4 ++
 .../javax/annotation/sql/DataSourceDefinition.java | 73 ++++++++++++++++++++++
 .../annotation/sql/DataSourceDefinitions.java      |  4 ++
 java/javax/servlet/FilterRegistration.java         | 19 ++++--
 java/javax/servlet/GenericFilter.java              |  7 +++
 java/javax/servlet/Registration.java               |  5 ++
 java/javax/servlet/ServletRegistration.java        | 34 ++++++++--
 14 files changed, 197 insertions(+), 10 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 01/03: Added Javadoc comments for Java 15

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 859b2b98ee4138bf479168773f7d94317f035753
Author: Igal Sapir <is...@apache.org>
AuthorDate: Sat Oct 3 11:24:58 2020 -0700

    Added Javadoc comments for Java 15
---
 java/javax/annotation/Priority.java                |  4 ++
 java/javax/annotation/Resource.java                | 32 ++++++++++
 java/javax/annotation/Resources.java               |  4 ++
 java/javax/annotation/security/DeclareRoles.java   |  4 ++
 java/javax/annotation/security/RolesAllowed.java   |  4 ++
 java/javax/annotation/security/RunAs.java          |  4 ++
 .../javax/annotation/sql/DataSourceDefinition.java | 73 ++++++++++++++++++++++
 .../annotation/sql/DataSourceDefinitions.java      |  4 ++
 8 files changed, 129 insertions(+)

diff --git a/java/javax/annotation/Priority.java b/java/javax/annotation/Priority.java
index a4980da..df757d9 100644
--- a/java/javax/annotation/Priority.java
+++ b/java/javax/annotation/Priority.java
@@ -29,5 +29,9 @@ import java.lang.annotation.Target;
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Priority {
+
+    /**
+     * @return the int value
+     */
     int value();
 }
diff --git a/java/javax/annotation/Resource.java b/java/javax/annotation/Resource.java
index 498ca22..232ec56 100644
--- a/java/javax/annotation/Resource.java
+++ b/java/javax/annotation/Resource.java
@@ -27,21 +27,53 @@ import java.lang.annotation.Target;
 @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Resource {
+
+    /**
+     * The AuthenticationType, either CONTAINER or APPLICATION
+     */
     public enum AuthenticationType {
+        /**
+         * Container authentication
+         */
         CONTAINER,
+        /**
+         * Application authentication
+         */
         APPLICATION
     }
+
+    /**
+     * @return a String with the name of the resource
+     */
     public String name() default "";
+    
     /**
      * Uses generics since Common Annotations 1.2.
      *
      * @return The type for instances of this resource
      */
     public Class<?> type() default Object.class;
+
+    /**
+     * @return the AuthenticationType of the resource default CONTAINER
+     */
     public AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
+
+    /**
+     * @return true (default) if the resource is shareable, or false if not
+     */
     public boolean shareable() default true;
+
+    /**
+     * @return a string with the description for the resource
+     */
     public String description() default "";
+
+    /**
+     * @return a string with the mappedName of the resource
+     */
     public String mappedName() default "";
+
     /**
      * @since Common Annotations 1.1
      *
diff --git a/java/javax/annotation/Resources.java b/java/javax/annotation/Resources.java
index 7b79dda..48d55c1 100644
--- a/java/javax/annotation/Resources.java
+++ b/java/javax/annotation/Resources.java
@@ -29,5 +29,9 @@ import java.lang.annotation.Target;
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Resources {
+
+    /**
+     * @return a Resource[] with the value of this Resources
+     */
     public Resource[] value();
 }
diff --git a/java/javax/annotation/security/DeclareRoles.java b/java/javax/annotation/security/DeclareRoles.java
index d50e30d..7bf21e5 100644
--- a/java/javax/annotation/security/DeclareRoles.java
+++ b/java/javax/annotation/security/DeclareRoles.java
@@ -29,5 +29,9 @@ import java.lang.annotation.Target;
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface DeclareRoles {
+
+    /**
+     * @return a String[] with the roles
+     */
     public String[] value();
 }
diff --git a/java/javax/annotation/security/RolesAllowed.java b/java/javax/annotation/security/RolesAllowed.java
index f916b6d..202b184 100644
--- a/java/javax/annotation/security/RolesAllowed.java
+++ b/java/javax/annotation/security/RolesAllowed.java
@@ -29,5 +29,9 @@ import java.lang.annotation.Target;
 @Target({ElementType.TYPE, ElementType.METHOD})
 @Retention(RetentionPolicy.RUNTIME)
 public @interface RolesAllowed {
+
+    /**
+     * @return a String[] of the allowed roles
+     */
     public String[] value();
 }
diff --git a/java/javax/annotation/security/RunAs.java b/java/javax/annotation/security/RunAs.java
index 8a366e2..1484fee 100644
--- a/java/javax/annotation/security/RunAs.java
+++ b/java/javax/annotation/security/RunAs.java
@@ -29,5 +29,9 @@ import java.lang.annotation.Target;
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface RunAs {
+
+    /**
+     * @return a String with the value for RunAs
+     */
     public String value();
 }
diff --git a/java/javax/annotation/sql/DataSourceDefinition.java b/java/javax/annotation/sql/DataSourceDefinition.java
index feb0758..9274283 100644
--- a/java/javax/annotation/sql/DataSourceDefinition.java
+++ b/java/javax/annotation/sql/DataSourceDefinition.java
@@ -27,22 +27,95 @@ import java.lang.annotation.Target;
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface DataSourceDefinition {
+    
+    /**
+     * @return the className
+     */
     String className();
+    
+    /**
+     * @return the name
+     */
     String name();
+    
+    /**
+     * @return the description
+     */
     String description() default "";
+    
+    /**
+     * @return the url
+     */
     String url() default "";
+    
+    /**
+     * @return the user
+     */
     String user() default "";
+    
+    /**
+     * @return the password
+     */
     String password() default "";
+    
+    /**
+     * @return database name
+     */
     String databaseName() default "";
+    
+    /**
+     * @return the port number
+     */
     int portNumber() default -1;
+    
+    /**
+     * @return the server name
+     */
     String serverName() default "localhost";
+    
+    /**
+     * @return the isolation level
+     */
     int isolationLevel() default -1;
+    
+    /**
+     * @return true if the data source is transactional
+     */
     boolean transactional() default true;
+    
+    /**
+     * @return the initial pool size
+     */
     int initialPoolSize() default -1;
+    
+    /**
+     * @return the max pool size
+     */
     int maxPoolSize() default -1;
+    
+    /**
+     * @return the min pool size
+     */
     int minPoolSize() default -1;
+    
+    /**
+     * @return the max idle time
+     */
     int maxIdleTime() default -1;
+    
+    /**
+     * @return the max statements
+     */
     int maxStatements() default -1;
+    
+    /**
+     * @return a String[] with the properties
+     */
     String[] properties() default {};
+    
+    /**
+     * @return the login timeout
+     */
     int loginTimeout() default 0;
+    
 }
diff --git a/java/javax/annotation/sql/DataSourceDefinitions.java b/java/javax/annotation/sql/DataSourceDefinitions.java
index 7fcbc050..6dd8a69 100644
--- a/java/javax/annotation/sql/DataSourceDefinitions.java
+++ b/java/javax/annotation/sql/DataSourceDefinitions.java
@@ -27,5 +27,9 @@ import java.lang.annotation.Target;
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface DataSourceDefinitions {
+
+    /**
+     * @return a DataSourceDefinition[]
+     */
     DataSourceDefinition[] value();
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 03/03: Add remaining Javadoc for the Annotations API

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 3d7c17fde1abc3171e2a4d744bc96f2f4557db91
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Oct 6 10:25:51 2020 +0100

    Add remaining Javadoc for the Annotations API
---
 java/javax/annotation/Generated.java   | 10 ++++++++++
 java/javax/annotation/ManagedBean.java |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/java/javax/annotation/Generated.java b/java/javax/annotation/Generated.java
index 06d99bd..9ba2942 100644
--- a/java/javax/annotation/Generated.java
+++ b/java/javax/annotation/Generated.java
@@ -31,7 +31,17 @@ import java.lang.annotation.Target;
     ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE})
 @Retention(RetentionPolicy.SOURCE)
 public @interface Generated {
+    /**
+     * @return The name of the code generator. It is recommended that the fully
+     *         qualified name of the code generator is used.
+     */
     public String[] value();
+    /**
+     * @return The date the code was generated
+     */
     public String date() default "";
+    /**
+     * @return Additional comments (if any) related to the code generation
+     */
     public String comments() default "";
 }
diff --git a/java/javax/annotation/ManagedBean.java b/java/javax/annotation/ManagedBean.java
index f2739a4..c0189a0 100644
--- a/java/javax/annotation/ManagedBean.java
+++ b/java/javax/annotation/ManagedBean.java
@@ -27,5 +27,8 @@ import java.lang.annotation.Target;
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface ManagedBean {
+    /**
+     * @return Name of the managed bean
+     */
     String value() default "";
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 02/03: Added Javadoc comments for Java 15

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 92289a8daedd9d3152a731c7baf8253c1abf4684
Author: Igal Sapir <is...@apache.org>
AuthorDate: Sat Oct 3 13:53:51 2020 -0700

    Added Javadoc comments for Java 15
---
 java/javax/servlet/FilterRegistration.java  | 19 +++++++++++-----
 java/javax/servlet/GenericFilter.java       |  7 ++++++
 java/javax/servlet/Registration.java        |  5 +++++
 java/javax/servlet/ServletRegistration.java | 34 ++++++++++++++++++++++++-----
 4 files changed, 55 insertions(+), 10 deletions(-)

diff --git a/java/javax/servlet/FilterRegistration.java b/java/javax/servlet/FilterRegistration.java
index b9b10ed..3817aff 100644
--- a/java/javax/servlet/FilterRegistration.java
+++ b/java/javax/servlet/FilterRegistration.java
@@ -20,8 +20,9 @@ import java.util.Collection;
 import java.util.EnumSet;
 
 /**
+ * Interface through which a Filter may be further configured.
+ *
  * @since Servlet 3.0
- * TODO SERVLET3 - Add comments
  */
 public interface FilterRegistration extends Registration {
 
@@ -43,9 +44,12 @@ public interface FilterRegistration extends Registration {
     public void addMappingForServletNames(
             EnumSet<DispatcherType> dispatcherTypes,
             boolean isMatchAfter, String... servletNames);
+
     /**
+     * Gets the currently available servlet name mappings of the Filter
+     * represented by this FilterRegistration.
      *
-     * @return TODO
+     * @return a Collection of the Servlet name mappings
      */
     public Collection<String> getServletNameMappings();
 
@@ -69,13 +73,18 @@ public interface FilterRegistration extends Registration {
             boolean isMatchAfter, String... urlPatterns);
 
     /**
+     * Gets the currently available URL pattern mappings of the Filter
+     * represented by this FilterRegistration.
      *
-     * @return TODO
+     * @return a Collection of the URL pattern mappings
      */
     public Collection<String> getUrlPatternMappings();
 
-    public static interface Dynamic
-    extends FilterRegistration, Registration.Dynamic {
+    /**
+     * Interface through which a Filter registered via one of the addFilter
+     * methods on ServletContext may be further configured.
+     */
+    public static interface Dynamic extends FilterRegistration, Registration.Dynamic {
         // No additional methods
     }
 }
diff --git a/java/javax/servlet/GenericFilter.java b/java/javax/servlet/GenericFilter.java
index 3f78fe4..32ea77a 100644
--- a/java/javax/servlet/GenericFilter.java
+++ b/java/javax/servlet/GenericFilter.java
@@ -19,6 +19,13 @@ package javax.servlet;
 import java.io.Serializable;
 import java.util.Enumeration;
 
+/**
+ * Provides a base class the implements the Filter and FilterConfig interfaces
+ * to reduce boilerplate when writing new filters.
+ *
+ * @see javax.servlet.Filter
+ * @see javax.servlet.FilterConfig
+ */
 public abstract class GenericFilter implements Filter, FilterConfig, Serializable {
 
     private static final long serialVersionUID = 1L;
diff --git a/java/javax/servlet/Registration.java b/java/javax/servlet/Registration.java
index 3eebca5..49ecd9c 100644
--- a/java/javax/servlet/Registration.java
+++ b/java/javax/servlet/Registration.java
@@ -78,6 +78,11 @@ public interface Registration {
      */
     public Map<String, String> getInitParameters();
 
+    /**
+     * Interface through which a Servlet or Filter registered via one of the
+     * addServlet or addFilter methods, respectively, on ServletContext may be
+     * further configured.
+     */
     public interface Dynamic extends Registration {
 
         /**
diff --git a/java/javax/servlet/ServletRegistration.java b/java/javax/servlet/ServletRegistration.java
index 44be9d2..d31611b 100644
--- a/java/javax/servlet/ServletRegistration.java
+++ b/java/javax/servlet/ServletRegistration.java
@@ -20,27 +20,51 @@ import java.util.Collection;
 import java.util.Set;
 
 /**
- * TODO SERVLET3 - Add comments
+ * Interface through which a Servlet may be further configured.
+ *
  * @since Servlet 3.0
  */
 public interface ServletRegistration extends Registration {
 
     /**
-     * TODO
+     * Adds a servlet mapping with the given URL patterns for the Servlet
+     * represented by this ServletRegistration. If any of the specified URL
+     * patterns are already mapped to a different Servlet, no updates will
+     * be performed.
+     *
+     * If this method is called multiple times, each successive call adds to
+     * the effects of the former. The returned set is not backed by the
+     * ServletRegistration object, so changes in the returned set are not
+     * reflected in the ServletRegistration object, and vice-versa.
+     *
      * @param urlPatterns The URL patterns that this Servlet should be mapped to
-     * @return TODO
+     * @return the (possibly empty) Set of URL patterns that are already mapped
+     * to a different Servlet
      * @throws IllegalArgumentException if urlPattern is null or empty
      * @throws IllegalStateException if the associated ServletContext has
      *                                  already been initialised
      */
     public Set<String> addMapping(String... urlPatterns);
 
+    /**
+     * Gets the currently available mappings of the Servlet represented by this
+     * ServletRegistration.
+     *
+     * If permitted, any changes to the returned Collection must not affect this
+     * ServletRegistration.
+     *
+     * @return a (possibly empty) Collection of the currently available mappings
+     * of the Servlet represented by this ServletRegistration
+     */
     public Collection<String> getMappings();
 
     public String getRunAsRole();
 
-    public static interface Dynamic
-    extends ServletRegistration, Registration.Dynamic {
+    /**
+     * Interface through which a Servlet registered via one of the addServlet
+     * methods on ServletContext may be further configured.
+     */
+    public static interface Dynamic extends ServletRegistration, Registration.Dynamic {
         public void setLoadOnStartup(int loadOnStartup);
         public Set<String> setServletSecurity(ServletSecurityElement constraint);
         public void setMultipartConfig(MultipartConfigElement multipartConfig);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org