Re: [NOTICE] - Moving and Upgrading of Buildbot Jobs

2021-08-31 Thread Gavin McDonald
Hi Mark

Dropping builds@ for the Tomcat specific reply.

On Mon, Aug 16, 2021 at 9:40 AM Mark Thomas  wrote:

> On 15/08/2021 09:44, Gavin McDonald wrote:
>
> 
>
> > For those of you with nightly builds that use ci.apache.org/projects/* -
> > please note that this service is deprecated and will NOT be available
> going
> > forward. Instead, your jobs should be changed to upload to
> > https://nightlies.apache.org/$project/* instead. Please request if you
> want
> > your existing content migrated over otherwise we will not do so.
>
> Hi Gavin,
>
> One question about the above.
>
> The Tomcat builds currently generate:
> - code coverage reports
> - docs
> - test logs
> - RAT output
>
> to ci.a.o/projects/...
>
> Does the above mean that the migration includes necessary changes to
> generate this output to nightlies.a.o instead? If so, that is great and
> thanks for taking care of this. If not, what do we need to do?
>

Yes I can take care of the code changes needed.


> Either way, we don't need the old content migrated.
>

Thanks for confirming.


> Oh, is there an automatic process to remove old content from
> nightlies.a.o? If not, we'll need to add one as we (well, I) currently
> clean up old logs (the only dir that builds up over time) manually every
> few months.
>

There will be a generic cleanup script that will likely delete old files
over $n days
old if your project folder is over $x GB. Details to be ironed out.

I think though that this is a hammer and not a scalpel and could have
undesired
effects on displayed output. So might be better to create your own cleanup
script
at a later date.

One last thing to iron out, where do you want your new config file to live,
in the new
SVN location [1] or the new Git location [2] ?

[1] - https://svn.apache.org/repos/infra/infrastructure/buildbot2/projects
[2] - https://github.com/apache/infrastructure-bb2

Finally, I have a ticket to track progress.

https://issues.apache.org/jira/browse/INFRA-22276

Let me know when I can go ahead.



> Thanks,
>
> Mark
>


-- 

*Gavin McDonald*
Systems Administrator
ASF Infrastructure Team


[Bug 65527] Tomcat 8.5.70 build fails

2021-08-31 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65527

--- Comment #4 from Alexander Veit  ---
The Ant version used was 1.10.7.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.31

2021-08-31 Thread Mark Thomas

On 26/08/2021 17:04, Mark Thomas wrote:

Version 1.2.31 includes the following changes compared to 1.2.30

- Build an issue when building with OpenSSL 3.0.0

- Clean up remaining reference to pkg-config

The proposed release artefacts can be found at [1],
and the build was done using tag [2].

The Apache Tomcat Native 1.2.31 release is
  [X] Stable, go ahead and release
  [ ] Broken because of ...


Tested on Linux (source) and Windows (binaries).

Mark

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



[Bug 65525] Exception in thread "http-nio-8080-ClientPoller" java.lang.NullPointerException

2021-08-31 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65525

Mark Thomas  changed:

   What|Removed |Added

Version|unspecified |9.0.37

--- Comment #1 from Mark Thomas  ---
Set correct Tomcat version for given Spring Boot version

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 65525] Exception in thread "http-nio-8080-ClientPoller" java.lang.NullPointerException

2021-08-31 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65525

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #2 from Mark Thomas  ---
You need to use a newer version of Tomcat.

9.0.52 is the latest as I type this. 9.0.40 or later should address the
specific issue reported here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [NOTICE] - Moving and Upgrading of Buildbot Jobs

2021-08-31 Thread Mark Thomas

On 31/08/2021 08:07, Gavin McDonald wrote:




Does the above mean that the migration includes necessary changes to
generate this output to nightlies.a.o instead? If so, that is great and
thanks for taking care of this. If not, what do we need to do?



Yes I can take care of the code changes needed.


Great. Many thanks.


Oh, is there an automatic process to remove old content from
nightlies.a.o? If not, we'll need to add one as we (well, I) currently
clean up old logs (the only dir that builds up over time) manually every
few months.



There will be a generic cleanup script that will likely delete old files
over $n days
old if your project folder is over $x GB. Details to be ironed out.

I think though that this is a hammer and not a scalpel and could have
undesired
effects on displayed output. So might be better to create your own cleanup
script
at a later date.


The hammer will be sufficient for our needs. It is only test logs that 
build up over time (assuming the same directory structure as the current 
jobs is retained) and deleting everything older than X days will be fine.



One last thing to iron out, where do you want your new config file to live,
in the new
SVN location [1] or the new Git location [2] ?

[1] - https://svn.apache.org/repos/infra/infrastructure/buildbot2/projects
[2] - https://github.com/apache/infrastructure-bb2


I'm going to make a call on this and say git. The reasons are:

- Most of our repos have moved to git
- Using github means we have the option to edit the files via the web
  interface as well as the command line.


Finally, I have a ticket to track progress.

https://issues.apache.org/jira/browse/INFRA-22276

Let me know when I can go ahead.


Please feel free to proceed at your convenience. The CI builds provide a 
very helpful check on what we are doing but nothing in our process 
requires them.


Mark

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



Re: [VOTE] Release Apache Tomcat Native 1.2.31

2021-08-31 Thread Rémy Maucherat
On Thu, Aug 26, 2021 at 6:04 PM Mark Thomas  wrote:
>
> Version 1.2.31 includes the following changes compared to 1.2.30
>
> - Build an issue when building with OpenSSL 3.0.0
>
> - Clean up remaining reference to pkg-config
>
> The proposed release artefacts can be found at [1],
> and the build was done using tag [2].
>
> The Apache Tomcat Native 1.2.31 release is
>   [X] Stable, go ahead and release
>   [ ] Broken because of ...


Rémy

> Thanks,
>
> Mark
>
>
> [1]
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/1.2.31
> [2]
> https://gitbox.apache.org/repos/asf?p=tomcat-native.git;a=commit;h=7e16cd817767bfc1be9fd854728d97641928702f
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

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



[tomcat] branch main updated: Fix JSP API Javadoc warnings for Java 16

2021-08-31 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 035eef9  Fix JSP API Javadoc warnings for Java 16
035eef9 is described below

commit 035eef91372bac71becf6dde6fcd8ba2ad178d64
Author: Mark Thomas 
AuthorDate: Tue Aug 31 17:55:09 2021 +0100

Fix JSP API Javadoc warnings for Java 16
---
 java/jakarta/el/ELResolver.java| 19 
 java/jakarta/servlet/jsp/JspContext.java   |  7 -
 .../servlet/jsp/el/ImplicitObjectELResolver.java   |  4 +++
 java/jakarta/servlet/jsp/tagext/JspIdConsumer.java | 10 +++
 .../servlet/jsp/tagext/TagAttributeInfo.java   | 34 +++---
 java/jakarta/servlet/jsp/tagext/TagSupport.java| 16 ++
 6 files changed, 79 insertions(+), 11 deletions(-)

diff --git a/java/jakarta/el/ELResolver.java b/java/jakarta/el/ELResolver.java
index 14625f7..a031c4a 100644
--- a/java/jakarta/el/ELResolver.java
+++ b/java/jakarta/el/ELResolver.java
@@ -118,8 +118,27 @@ public abstract class ELResolver {
 public abstract boolean isReadOnly(ELContext context, Object base,
 Object property);
 
+/**
+ * Obtain the feature descriptors for the resolvable properties of the 
given
+ * object.
+ *
+ * @param context The context in which the examination takes place
+ * @param base The object to examine
+ *
+ * @return An iterator, possibly empty, of feature descriptors of the given
+ * object
+ */
 public abstract Iterator 
getFeatureDescriptors(ELContext context, Object base);
 
+/**
+ * Obtain the most common type that is acceptable for the given base 
object.
+ *
+ * @param context The context in which the examination takes place
+ * @param base The object to examine
+ *
+ * @return {code null} if the most common type cannot be determine,
+ * otherwise the most common type
+ */
 public abstract Class getCommonPropertyType(ELContext context,
 Object base);
 
diff --git a/java/jakarta/servlet/jsp/JspContext.java 
b/java/jakarta/servlet/jsp/JspContext.java
index 774ba9c..8c1ebc4 100644
--- a/java/jakarta/servlet/jsp/JspContext.java
+++ b/java/jakarta/servlet/jsp/JspContext.java
@@ -227,7 +227,12 @@ public abstract class JspContext {
 @Deprecated
 public abstract jakarta.servlet.jsp.el.ExpressionEvaluator 
getExpressionEvaluator();
 
-
+/**
+ * Obtain the ELContext for this JSPContext. Each JSPContext has a 
dedicated
+ * ELCOntext.
+ *
+ * @return the ELContext for this JSPContext
+ */
 public abstract ELContext getELContext();
 
 /**
diff --git a/java/jakarta/servlet/jsp/el/ImplicitObjectELResolver.java 
b/java/jakarta/servlet/jsp/el/ImplicitObjectELResolver.java
index 3d00c87..3ed47eb 100644
--- a/java/jakarta/servlet/jsp/el/ImplicitObjectELResolver.java
+++ b/java/jakarta/servlet/jsp/el/ImplicitObjectELResolver.java
@@ -39,6 +39,7 @@ import jakarta.servlet.jsp.JspContext;
 import jakarta.servlet.jsp.PageContext;
 
 /**
+ * Provides resolution in EL for the implicit variables of a JSP page.
  *
  * @since 2.1
  */
@@ -71,6 +72,9 @@ public class ImplicitObjectELResolver extends ELResolver {
 
 private static final int SESSION_SCOPE = 10;
 
+/**
+ * Creates an instance of the implicit object resolver for EL.
+ */
 public ImplicitObjectELResolver() {
 super();
 }
diff --git a/java/jakarta/servlet/jsp/tagext/JspIdConsumer.java 
b/java/jakarta/servlet/jsp/tagext/JspIdConsumer.java
index 43a9f53..a6950d0 100644
--- a/java/jakarta/servlet/jsp/tagext/JspIdConsumer.java
+++ b/java/jakarta/servlet/jsp/tagext/JspIdConsumer.java
@@ -16,6 +16,16 @@
  */
 package jakarta.servlet.jsp.tagext;
 
+/**
+ * Interface that allows tag handlers to be provided with a unique (within the
+ * scope of the web application) ID.
+ */
 public interface JspIdConsumer {
+
+/**
+ * Set the unique ID for the tag handler.
+ *
+ * @param jspId The unique Id
+ */
 public void setJspId(String jspId);
 }
diff --git a/java/jakarta/servlet/jsp/tagext/TagAttributeInfo.java 
b/java/jakarta/servlet/jsp/tagext/TagAttributeInfo.java
index 507f8dc..e901736 100644
--- a/java/jakarta/servlet/jsp/tagext/TagAttributeInfo.java
+++ b/java/jakarta/servlet/jsp/tagext/TagAttributeInfo.java
@@ -26,11 +26,11 @@ package jakarta.servlet.jsp.tagext;
  */
 
 public class TagAttributeInfo {
+
 /**
  * "id" is wired in to be ID. There is no real benefit in having it be
  * something else IDREFs are not handled any differently.
  */
-
 public static final String ID = "id";
 
 /**
@@ -128,7 +128,6 @@ public class TagAttributeInfo {
  *
  * @return the name of the attribute
  */
-
 public String getName() {
 return name;
 }
@@ -138,7 +137,6 @@ p

[tomcat] branch 10.0.x updated: Fix JSP API Javadoc warnings for Java 16

2021-08-31 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new a700957  Fix JSP API Javadoc warnings for Java 16
a700957 is described below

commit a700957d93ebe9bf14be3957ea410d66fff1d620
Author: Mark Thomas 
AuthorDate: Tue Aug 31 17:55:09 2021 +0100

Fix JSP API Javadoc warnings for Java 16
---
 java/jakarta/el/ELResolver.java| 19 
 java/jakarta/servlet/jsp/JspContext.java   |  7 -
 .../servlet/jsp/el/ImplicitObjectELResolver.java   |  4 +++
 java/jakarta/servlet/jsp/tagext/JspIdConsumer.java | 10 +++
 .../servlet/jsp/tagext/TagAttributeInfo.java   | 34 +++---
 java/jakarta/servlet/jsp/tagext/TagSupport.java| 16 ++
 6 files changed, 79 insertions(+), 11 deletions(-)

diff --git a/java/jakarta/el/ELResolver.java b/java/jakarta/el/ELResolver.java
index 5c3a928..8675b41 100644
--- a/java/jakarta/el/ELResolver.java
+++ b/java/jakarta/el/ELResolver.java
@@ -118,8 +118,27 @@ public abstract class ELResolver {
 public abstract boolean isReadOnly(ELContext context, Object base,
 Object property);
 
+/**
+ * Obtain the feature descriptors for the resolvable properties of the 
given
+ * object.
+ *
+ * @param context The context in which the examination takes place
+ * @param base The object to examine
+ *
+ * @return An iterator, possibly empty, of feature descriptors of the given
+ * object
+ */
 public abstract Iterator 
getFeatureDescriptors(ELContext context, Object base);
 
+/**
+ * Obtain the most common type that is acceptable for the given base 
object.
+ *
+ * @param context The context in which the examination takes place
+ * @param base The object to examine
+ *
+ * @return {code null} if the most common type cannot be determine,
+ * otherwise the most common type
+ */
 public abstract Class getCommonPropertyType(ELContext context,
 Object base);
 
diff --git a/java/jakarta/servlet/jsp/JspContext.java 
b/java/jakarta/servlet/jsp/JspContext.java
index 774ba9c..8c1ebc4 100644
--- a/java/jakarta/servlet/jsp/JspContext.java
+++ b/java/jakarta/servlet/jsp/JspContext.java
@@ -227,7 +227,12 @@ public abstract class JspContext {
 @Deprecated
 public abstract jakarta.servlet.jsp.el.ExpressionEvaluator 
getExpressionEvaluator();
 
-
+/**
+ * Obtain the ELContext for this JSPContext. Each JSPContext has a 
dedicated
+ * ELCOntext.
+ *
+ * @return the ELContext for this JSPContext
+ */
 public abstract ELContext getELContext();
 
 /**
diff --git a/java/jakarta/servlet/jsp/el/ImplicitObjectELResolver.java 
b/java/jakarta/servlet/jsp/el/ImplicitObjectELResolver.java
index 4e63e26..43cee9d 100644
--- a/java/jakarta/servlet/jsp/el/ImplicitObjectELResolver.java
+++ b/java/jakarta/servlet/jsp/el/ImplicitObjectELResolver.java
@@ -39,6 +39,7 @@ import jakarta.servlet.jsp.JspContext;
 import jakarta.servlet.jsp.PageContext;
 
 /**
+ * Provides resolution in EL for the implicit variables of a JSP page.
  *
  * @since 2.1
  */
@@ -71,6 +72,9 @@ public class ImplicitObjectELResolver extends ELResolver {
 
 private static final int SESSION_SCOPE = 10;
 
+/**
+ * Creates an instance of the implicit object resolver for EL.
+ */
 public ImplicitObjectELResolver() {
 super();
 }
diff --git a/java/jakarta/servlet/jsp/tagext/JspIdConsumer.java 
b/java/jakarta/servlet/jsp/tagext/JspIdConsumer.java
index 43a9f53..a6950d0 100644
--- a/java/jakarta/servlet/jsp/tagext/JspIdConsumer.java
+++ b/java/jakarta/servlet/jsp/tagext/JspIdConsumer.java
@@ -16,6 +16,16 @@
  */
 package jakarta.servlet.jsp.tagext;
 
+/**
+ * Interface that allows tag handlers to be provided with a unique (within the
+ * scope of the web application) ID.
+ */
 public interface JspIdConsumer {
+
+/**
+ * Set the unique ID for the tag handler.
+ *
+ * @param jspId The unique Id
+ */
 public void setJspId(String jspId);
 }
diff --git a/java/jakarta/servlet/jsp/tagext/TagAttributeInfo.java 
b/java/jakarta/servlet/jsp/tagext/TagAttributeInfo.java
index 507f8dc..e901736 100644
--- a/java/jakarta/servlet/jsp/tagext/TagAttributeInfo.java
+++ b/java/jakarta/servlet/jsp/tagext/TagAttributeInfo.java
@@ -26,11 +26,11 @@ package jakarta.servlet.jsp.tagext;
  */
 
 public class TagAttributeInfo {
+
 /**
  * "id" is wired in to be ID. There is no real benefit in having it be
  * something else IDREFs are not handled any differently.
  */
-
 public static final String ID = "id";
 
 /**
@@ -128,7 +128,6 @@ public class TagAttributeInfo {
  *
  * @return the name of the attribute
  */
-
 public String getName() {
 return name;
 }
@@ -138,7 +137,6 

[tomcat] branch 9.0.x updated: Fix JSP API Javadoc warnings for Java 16

2021-08-31 Thread markt
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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 4bc5c86  Fix JSP API Javadoc warnings for Java 16
4bc5c86 is described below

commit 4bc5c8662c168231090a2ad608620742d3eeac2a
Author: Mark Thomas 
AuthorDate: Tue Aug 31 17:55:09 2021 +0100

Fix JSP API Javadoc warnings for Java 16
---
 java/javax/el/ELResolver.java  | 19 
 java/javax/servlet/jsp/JspContext.java |  7 -
 .../servlet/jsp/el/ImplicitObjectELResolver.java   |  4 +++
 java/javax/servlet/jsp/tagext/JspIdConsumer.java   | 10 +++
 .../javax/servlet/jsp/tagext/TagAttributeInfo.java | 34 +++---
 java/javax/servlet/jsp/tagext/TagSupport.java  | 16 ++
 6 files changed, 79 insertions(+), 11 deletions(-)

diff --git a/java/javax/el/ELResolver.java b/java/javax/el/ELResolver.java
index 6a10cd1..0e438ec 100644
--- a/java/javax/el/ELResolver.java
+++ b/java/javax/el/ELResolver.java
@@ -118,8 +118,27 @@ public abstract class ELResolver {
 public abstract boolean isReadOnly(ELContext context, Object base,
 Object property);
 
+/**
+ * Obtain the feature descriptors for the resolvable properties of the 
given
+ * object.
+ *
+ * @param context The context in which the examination takes place
+ * @param base The object to examine
+ *
+ * @return An iterator, possibly empty, of feature descriptors of the given
+ * object
+ */
 public abstract Iterator 
getFeatureDescriptors(ELContext context, Object base);
 
+/**
+ * Obtain the most common type that is acceptable for the given base 
object.
+ *
+ * @param context The context in which the examination takes place
+ * @param base The object to examine
+ *
+ * @return {code null} if the most common type cannot be determine,
+ * otherwise the most common type
+ */
 public abstract Class getCommonPropertyType(ELContext context,
 Object base);
 
diff --git a/java/javax/servlet/jsp/JspContext.java 
b/java/javax/servlet/jsp/JspContext.java
index 0b8221b..20b5f8b 100644
--- a/java/javax/servlet/jsp/JspContext.java
+++ b/java/javax/servlet/jsp/JspContext.java
@@ -227,7 +227,12 @@ public abstract class JspContext {
 @SuppressWarnings("dep-ann") // TCK signature test fails with annotation
 public abstract javax.servlet.jsp.el.ExpressionEvaluator 
getExpressionEvaluator();
 
-
+/**
+ * Obtain the ELContext for this JSPContext. Each JSPContext has a 
dedicated
+ * ELCOntext.
+ *
+ * @return the ELContext for this JSPContext
+ */
 public abstract ELContext getELContext();
 
 /**
diff --git a/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java 
b/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
index 431cdc8..027b254 100644
--- a/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
+++ b/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
@@ -39,6 +39,7 @@ import javax.servlet.jsp.JspContext;
 import javax.servlet.jsp.PageContext;
 
 /**
+ * Provides resolution in EL for the implicit variables of a JSP page.
  *
  * @since 2.1
  */
@@ -71,6 +72,9 @@ public class ImplicitObjectELResolver extends ELResolver {
 
 private static final int SESSION_SCOPE = 10;
 
+/**
+ * Creates an instance of the implicit object resolver for EL.
+ */
 public ImplicitObjectELResolver() {
 super();
 }
diff --git a/java/javax/servlet/jsp/tagext/JspIdConsumer.java 
b/java/javax/servlet/jsp/tagext/JspIdConsumer.java
index f3d49bf..57fe4f1 100644
--- a/java/javax/servlet/jsp/tagext/JspIdConsumer.java
+++ b/java/javax/servlet/jsp/tagext/JspIdConsumer.java
@@ -16,6 +16,16 @@
  */
 package javax.servlet.jsp.tagext;
 
+/**
+ * Interface that allows tag handlers to be provided with a unique (within the
+ * scope of the web application) ID.
+ */
 public interface JspIdConsumer {
+
+/**
+ * Set the unique ID for the tag handler.
+ *
+ * @param jspId The unique Id
+ */
 public void setJspId(String jspId);
 }
diff --git a/java/javax/servlet/jsp/tagext/TagAttributeInfo.java 
b/java/javax/servlet/jsp/tagext/TagAttributeInfo.java
index 550a679..a54c019 100644
--- a/java/javax/servlet/jsp/tagext/TagAttributeInfo.java
+++ b/java/javax/servlet/jsp/tagext/TagAttributeInfo.java
@@ -26,11 +26,11 @@ package javax.servlet.jsp.tagext;
  */
 
 public class TagAttributeInfo {
+
 /**
  * "id" is wired in to be ID. There is no real benefit in having it be
  * something else IDREFs are not handled any differently.
  */
-
 public static final String ID = "id";
 
 /**
@@ -128,7 +128,6 @@ public class TagAttributeInfo {
  *
  * @return the name of the attribute
  */
-
 public String getName() {
 return name;
 }
@@ -138,

[tomcat] branch 8.5.x updated: Fix JSP API Javadoc warnings for Java 16

2021-08-31 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 2231b9b  Fix JSP API Javadoc warnings for Java 16
2231b9b is described below

commit 2231b9b7563a52ec0eb98e4c7324207087fbf129
Author: Mark Thomas 
AuthorDate: Tue Aug 31 17:55:09 2021 +0100

Fix JSP API Javadoc warnings for Java 16
---
 java/javax/el/ELResolver.java  | 19 
 java/javax/servlet/jsp/JspContext.java |  7 -
 .../servlet/jsp/el/ImplicitObjectELResolver.java   |  4 +++
 java/javax/servlet/jsp/tagext/JspIdConsumer.java   | 10 +++
 .../javax/servlet/jsp/tagext/TagAttributeInfo.java | 34 +++---
 java/javax/servlet/jsp/tagext/TagSupport.java  | 16 ++
 6 files changed, 79 insertions(+), 11 deletions(-)

diff --git a/java/javax/el/ELResolver.java b/java/javax/el/ELResolver.java
index 6a10cd1..0e438ec 100644
--- a/java/javax/el/ELResolver.java
+++ b/java/javax/el/ELResolver.java
@@ -118,8 +118,27 @@ public abstract class ELResolver {
 public abstract boolean isReadOnly(ELContext context, Object base,
 Object property);
 
+/**
+ * Obtain the feature descriptors for the resolvable properties of the 
given
+ * object.
+ *
+ * @param context The context in which the examination takes place
+ * @param base The object to examine
+ *
+ * @return An iterator, possibly empty, of feature descriptors of the given
+ * object
+ */
 public abstract Iterator 
getFeatureDescriptors(ELContext context, Object base);
 
+/**
+ * Obtain the most common type that is acceptable for the given base 
object.
+ *
+ * @param context The context in which the examination takes place
+ * @param base The object to examine
+ *
+ * @return {code null} if the most common type cannot be determine,
+ * otherwise the most common type
+ */
 public abstract Class getCommonPropertyType(ELContext context,
 Object base);
 
diff --git a/java/javax/servlet/jsp/JspContext.java 
b/java/javax/servlet/jsp/JspContext.java
index 0b8221b..20b5f8b 100644
--- a/java/javax/servlet/jsp/JspContext.java
+++ b/java/javax/servlet/jsp/JspContext.java
@@ -227,7 +227,12 @@ public abstract class JspContext {
 @SuppressWarnings("dep-ann") // TCK signature test fails with annotation
 public abstract javax.servlet.jsp.el.ExpressionEvaluator 
getExpressionEvaluator();
 
-
+/**
+ * Obtain the ELContext for this JSPContext. Each JSPContext has a 
dedicated
+ * ELCOntext.
+ *
+ * @return the ELContext for this JSPContext
+ */
 public abstract ELContext getELContext();
 
 /**
diff --git a/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java 
b/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
index 431cdc8..027b254 100644
--- a/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
+++ b/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
@@ -39,6 +39,7 @@ import javax.servlet.jsp.JspContext;
 import javax.servlet.jsp.PageContext;
 
 /**
+ * Provides resolution in EL for the implicit variables of a JSP page.
  *
  * @since 2.1
  */
@@ -71,6 +72,9 @@ public class ImplicitObjectELResolver extends ELResolver {
 
 private static final int SESSION_SCOPE = 10;
 
+/**
+ * Creates an instance of the implicit object resolver for EL.
+ */
 public ImplicitObjectELResolver() {
 super();
 }
diff --git a/java/javax/servlet/jsp/tagext/JspIdConsumer.java 
b/java/javax/servlet/jsp/tagext/JspIdConsumer.java
index f3d49bf..57fe4f1 100644
--- a/java/javax/servlet/jsp/tagext/JspIdConsumer.java
+++ b/java/javax/servlet/jsp/tagext/JspIdConsumer.java
@@ -16,6 +16,16 @@
  */
 package javax.servlet.jsp.tagext;
 
+/**
+ * Interface that allows tag handlers to be provided with a unique (within the
+ * scope of the web application) ID.
+ */
 public interface JspIdConsumer {
+
+/**
+ * Set the unique ID for the tag handler.
+ *
+ * @param jspId The unique Id
+ */
 public void setJspId(String jspId);
 }
diff --git a/java/javax/servlet/jsp/tagext/TagAttributeInfo.java 
b/java/javax/servlet/jsp/tagext/TagAttributeInfo.java
index 550a679..a54c019 100644
--- a/java/javax/servlet/jsp/tagext/TagAttributeInfo.java
+++ b/java/javax/servlet/jsp/tagext/TagAttributeInfo.java
@@ -26,11 +26,11 @@ package javax.servlet.jsp.tagext;
  */
 
 public class TagAttributeInfo {
+
 /**
  * "id" is wired in to be ID. There is no real benefit in having it be
  * something else IDREFs are not handled any differently.
  */
-
 public static final String ID = "id";
 
 /**
@@ -128,7 +128,6 @@ public class TagAttributeInfo {
  *
  * @return the name of the attribute
  */
-
 public String getName() {
 return name;
 }
@@ -138,

[tomcat] branch main updated (035eef9 -> 36fa7bd)

2021-08-31 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 035eef9  Fix JSP API Javadoc warnings for Java 16
 new ba68069  Refactor to avoid NPE warnings in IDE
 new 36fa7bd  Fix IDE warnings. Use <> where possible.

The 2 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:
 .../catalina/users/DataSourceUserDatabase.java | 27 +++---
 1 file changed, 14 insertions(+), 13 deletions(-)

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



[tomcat] 01/02: Refactor to avoid NPE warnings in IDE

2021-08-31 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit ba6806966148dc35ef5beef51c69541369fc2d22
Author: Mark Thomas 
AuthorDate: Tue Aug 31 18:02:36 2021 +0100

Refactor to avoid NPE warnings in IDE
---
 java/org/apache/catalina/users/DataSourceUserDatabase.java | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/users/DataSourceUserDatabase.java 
b/java/org/apache/catalina/users/DataSourceUserDatabase.java
index f90d1b0..dbe1a69 100644
--- a/java/org/apache/catalina/users/DataSourceUserDatabase.java
+++ b/java/org/apache/catalina/users/DataSourceUserDatabase.java
@@ -1092,11 +1092,13 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 tempRelationDelete2.append(roleNameCol);
 tempRelationDelete2.append(" = ?");
 for (Role role : removedRoles.values()) {
-try (PreparedStatement stmt = 
dbConnection.prepareStatement(tempRelationDelete.toString())) {
-stmt.setString(1, role.getRolename());
-stmt.executeUpdate();
-} catch (SQLException e) {
-
log.error(sm.getString("dataSourceUserDatabase.exception"), e);
+if (tempRelationDelete != null) {
+try (PreparedStatement stmt = 
dbConnection.prepareStatement(tempRelationDelete.toString())) {
+stmt.setString(1, role.getRolename());
+stmt.executeUpdate();
+} catch (SQLException e) {
+
log.error(sm.getString("dataSourceUserDatabase.exception"), e);
+}
 }
 try (PreparedStatement stmt = 
dbConnection.prepareStatement(tempRelationDelete2.toString())) {
 stmt.setString(1, role.getRolename());
@@ -1180,7 +1182,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 temp.append(" = ?");
 }
 for (Group group : modifiedGroups.values()) {
-if (roleAndGroupDescriptionCol != null) {
+if (temp != null) {
 try (PreparedStatement stmt = 
dbConnection.prepareStatement(temp.toString())) {
 stmt.setString(1, group.getDescription());
 stmt.setString(2, group.getGroupname());

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



[tomcat] 02/02: Fix IDE warnings. Use <> where possible.

2021-08-31 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 36fa7bd76fc2328c778081b0bb0c34c2a30d345f
Author: Mark Thomas 
AuthorDate: Tue Aug 31 18:03:42 2021 +0100

Fix IDE warnings. Use <> where possible.
---
 java/org/apache/catalina/users/DataSourceUserDatabase.java | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/users/DataSourceUserDatabase.java 
b/java/org/apache/catalina/users/DataSourceUserDatabase.java
index dbe1a69..a5bff3a 100644
--- a/java/org/apache/catalina/users/DataSourceUserDatabase.java
+++ b/java/org/apache/catalina/users/DataSourceUserDatabase.java
@@ -559,7 +559,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 public Group createGroup(String groupname, String description) {
 readLock.lock();
 try {
-Group group = new GenericGroup(this, 
groupname, description, null);
+Group group = new GenericGroup<>(this, groupname, description, 
null);
 createdGroups.put(groupname, group);
 modifiedGroups.remove(groupname);
 removedGroups.remove(groupname);
@@ -573,7 +573,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 public Role createRole(String rolename, String description) {
 readLock.lock();
 try {
-Role role = new GenericRole(this, 
rolename, description);
+Role role = new GenericRole<>(this, rolename, description);
 createdRoles.put(rolename, role);
 modifiedRoles.remove(rolename);
 removedRoles.remove(rolename);
@@ -587,7 +587,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 public User createUser(String username, String password, String fullName) {
 readLock.lock();
 try {
-User user = new GenericUser(this, 
username, password, fullName, null, null);
+User user = new GenericUser<>(this, username, password, fullName, 
null, null);
 createdUsers.put(username, user);
 modifiedUsers.remove(username);
 removedUsers.remove(username);
@@ -657,7 +657,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 
log.error(sm.getString("dataSourceUserDatabase.exception"), e);
 }
 }
-group = new GenericGroup(this, 
groupName, description, groupRoles);
+group = new GenericGroup<>(this, groupName, 
description, groupRoles);
 }
 }
 }
@@ -707,7 +707,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 if (rs.next()) {
 if (rs.getString(1) != null) {
 String description = (roleAndGroupDescriptionCol != 
null) ? rs.getString(2) : null;
-role = new GenericRole(this, 
roleName, description);
+role = new GenericRole<>(this, roleName, description);
 }
 }
 }
@@ -811,8 +811,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 }
 }
 
-User user = new GenericUser(this, userName, 
dbCredentials,
-fullName, groups, roles);
+User user = new GenericUser<>(this, userName, dbCredentials, fullName, 
groups, roles);
 return user;
 }
 

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



[tomcat] branch main updated: Add hashCode implementations that are aligned with existing equals()

2021-08-31 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new cd094d8  Add hashCode implementations that are aligned with existing 
equals()
cd094d8 is described below

commit cd094d8bc7ed46c3410ea494738ac6cf5b1c
Author: Mark Thomas 
AuthorDate: Tue Aug 31 18:16:03 2021 +0100

Add hashCode implementations that are aligned with existing equals()
---
 java/org/apache/catalina/users/GenericGroup.java | 8 
 java/org/apache/catalina/users/GenericRole.java  | 8 
 java/org/apache/catalina/users/GenericUser.java  | 8 
 3 files changed, 24 insertions(+)

diff --git a/java/org/apache/catalina/users/GenericGroup.java 
b/java/org/apache/catalina/users/GenericGroup.java
index 2439788..153f5e5 100644
--- a/java/org/apache/catalina/users/GenericGroup.java
+++ b/java/org/apache/catalina/users/GenericGroup.java
@@ -179,4 +179,12 @@ public class GenericGroup extends 
AbstractGroup {
 }
 
 
+@Override
+public int hashCode() {
+final int prime = 31;
+int result = 1;
+result = prime * result + ((database == null) ? 0 : 
database.hashCode());
+result = prime * result + ((groupname == null) ? 0 : 
groupname.hashCode());
+return result;
+}
 }
diff --git a/java/org/apache/catalina/users/GenericRole.java 
b/java/org/apache/catalina/users/GenericRole.java
index 4da7c4d..2103714 100644
--- a/java/org/apache/catalina/users/GenericRole.java
+++ b/java/org/apache/catalina/users/GenericRole.java
@@ -98,4 +98,12 @@ public class GenericRole extends 
AbstractRole {
 }
 
 
+@Override
+public int hashCode() {
+final int prime = 31;
+int result = 1;
+result = prime * result + ((database == null) ? 0 : 
database.hashCode());
+result = prime * result + ((rolename == null) ? 0 : 
rolename.hashCode());
+return result;
+}
 }
diff --git a/java/org/apache/catalina/users/GenericUser.java 
b/java/org/apache/catalina/users/GenericUser.java
index 8788cbd..a020acd 100644
--- a/java/org/apache/catalina/users/GenericUser.java
+++ b/java/org/apache/catalina/users/GenericUser.java
@@ -254,4 +254,12 @@ public class GenericUser extends 
AbstractUser {
 }
 
 
+@Override
+public int hashCode() {
+final int prime = 31;
+int result = 1;
+result = prime * result + ((database == null) ? 0 : 
database.hashCode());
+result = prime * result + ((username == null) ? 0 : 
username.hashCode());
+return result;
+}
 }

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



Tagging 10.1.0-M5 etc

2021-08-31 Thread Mark Thomas

Hi all,

Things are looking good for the September release. We do need the Tomcat 
Native 1.2.31 vote to complete first (thanks for your vote Rémy). If you 
have time to test with 1.2.31 your vote would be really helpful as we 
only have 2 votes so far.


Assuming 1.2.31 passes, I'll complete the release then update the Tomcat 
branches, test and then tag. If everything goes well, we should have 
release votes running by the end of the week and hopefully a little sooner.


Mark

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



[tomcat] branch main updated: Add Derby for the testsuite

2021-08-31 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 7a82963  Add Derby for the testsuite
7a82963 is described below

commit 7a82963a78a8242b3c8c276de2382594f8a74f42
Author: remm 
AuthorDate: Tue Aug 31 21:32:10 2021 +0200

Add Derby for the testsuite

It can be used for JDBC testing. Also for DataSource with our pools.
---
 build.properties.default   | 24 
 build.xml  | 30 ++
 webapps/docs/changelog.xml |  4 
 3 files changed, 58 insertions(+)

diff --git a/build.properties.default b/build.properties.default
index 4032660..53fe36e 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -331,3 +331,27 @@ 
jsign.checksum.value=50982facf864df4f08a051b43f7d2e42|3d203fbffdc45e837f98b7c9c5
 jsign.home=${base.path}/jsign-${jsign.version}
 jsign.jar=${jsign.home}/jsign-${jsign.version}.jar
 
jsign.loc=${base-maven.loc}/net/jsign/jsign/${jsign.version}/jsign-${jsign.version}.jar
+
+# - Derby, used by unit tests -
+derby.version=10.15.2.0
+
+# checksums for Derby 10.15.2.0
+derby.checksum.enabled=true
+derby.checksum.algorithm=MD5|SHA-1
+derby.checksum.value=abff01351b19bc62a188bac08a8bb58b|b64da6681994f33ba5783ffae55cdb44885b9e70
+derby-shared.checksum.enabled=true
+derby-shared.checksum.algorithm=MD5|SHA-1
+derby-shared.checksum.value=2cb9ab8b9cfb06c2da5a1d3825d04344|ff2dfb3e2a92d593cf111baad242d156947abbc1
+derby-tools.checksum.enabled=true
+derby-tools.checksum.algorithm=MD5|SHA-1
+derby-tools.checksum.value=d41578eeb336b0e479be8f30bfd9ab9b|d63722381e0e893d797e4d531e219e2917898364
+
+derby.home=${base.path}/derby-${derby.version}
+derby.jar=${derby.home}/derby-${derby.version}.jar
+derby.loc=${base-maven.loc}/org/apache/derby/derby/${derby.version}/derby-${derby.version}.jar
+derby-shared.jar=${derby.home}/derby-shared-${derby.version}.jar
+derby-shared.loc=${base-maven.loc}/org/apache/derby/derbyshared/${derby.version}/derbyshared-${derby.version}.jar
+derby-tools.jar=${derby.home}/derby-tools-${derby.version}.jar
+derby-tools.loc=${base-maven.loc}/org/apache/derby/derbytools/${derby.version}/derbytools-${derby.version}.jar
+
+
diff --git a/build.xml b/build.xml
index 330bcd7..2459234 100644
--- a/build.xml
+++ b/build.xml
@@ -234,6 +234,9 @@
 
 
 
+
+
+
 
 
   
@@ -3230,6 +3233,33 @@ skip.installer property in build.properties" />
   
 
 
+
+  
+  
+  
+  
+  
+  
+
+
+
+  
+  
+  
+  
+  
+  
+
+
+
+  
+  
+  
+  
+  
+  
+
+
   
 
   
+  
+Add Apache Derby 10.15.2.0 to the testsuite dependencies, for JDBC
+and DataSource testing. (remm)
+  
 
   
 

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



[tomcat] branch main updated: Fix group roles not working

2021-08-31 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 5907d8f  Fix group roles not working
5907d8f is described below

commit 5907d8f284aa50cc970b43dd6352da143c95cd31
Author: remm 
AuthorDate: Tue Aug 31 21:34:41 2021 +0200

Fix group roles not working

Also for a simple schema, the roles didn't work properly. Now when
there's no role table, roles exist when they are assigned to a user.
---
 .../catalina/users/DataSourceUserDatabase.java | 26 +++---
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/catalina/users/DataSourceUserDatabase.java 
b/java/org/apache/catalina/users/DataSourceUserDatabase.java
index a5bff3a..2c6eb5e 100644
--- a/java/org/apache/catalina/users/DataSourceUserDatabase.java
+++ b/java/org/apache/catalina/users/DataSourceUserDatabase.java
@@ -128,7 +128,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 /**
  * The generated string for the groups PreparedStatement
  */
-private String preparedGroupsR = null;
+private String preparedGroupRoles = null;
 
 
 /**
@@ -640,7 +640,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 ArrayList groupRoles = new ArrayList<>();
 if (groupName != null) {
 groupName = groupName.trim();
-try (PreparedStatement stmt2 = 
dbConnection.prepareStatement(preparedGroupsR)) {
+try (PreparedStatement stmt2 = 
dbConnection.prepareStatement(preparedGroupRoles)) {
 stmt2.setString(1, groupName);
 try (ResultSet rs2 = stmt2.executeQuery()) {
 while (rs2.next()) {
@@ -869,7 +869,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 temp.append(" = ?");
 preparedRoles = temp.toString();
 
-if (userGroupTable != null && userGroupTable.length() > 0) {
+if (userGroupTable != null) {
 temp = new StringBuilder("SELECT ");
 temp.append(groupNameCol);
 temp.append(" FROM ");
@@ -880,15 +880,15 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 preparedGroups = temp.toString();
 }
 
-if (groupRoleTable != null && groupRoleTable.length() > 0) {
+if (groupRoleTable != null) {
 temp = new StringBuilder("SELECT ");
-temp.append(groupNameCol);
+temp.append(roleNameCol);
 temp.append(" FROM ");
 temp.append(groupRoleTable);
 temp.append(" WHERE ");
 temp.append(groupNameCol);
 temp.append(" = ?");
-preparedGroupsR = temp.toString();
+preparedGroupRoles = temp.toString();
 }
 
 temp = new StringBuilder("SELECT ");
@@ -909,7 +909,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 temp.append(userTable);
 preparedAllUsers = temp.toString();
 
-if (groupTable != null && groupTable.length() > 0) {
+if (groupTable != null) {
 temp = new StringBuilder("SELECT ");
 temp.append(groupNameCol);
 if (roleAndGroupDescriptionCol != null) {
@@ -929,7 +929,7 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 preparedAllGroups = temp.toString();
 }
 
-if (roleTable != null && roleTable.length() > 0) {
+if (roleTable != null) {
 // Create the role PreparedStatement string
 temp = new StringBuilder("SELECT ");
 temp.append(roleNameCol);
@@ -948,6 +948,16 @@ public class DataSourceUserDatabase extends 
SparseUserDatabase {
 temp.append(" FROM ");
 temp.append(roleTable);
 preparedAllRoles = temp.toString();
+} else {
+// Validate roles existence from the user <-> roles table
+temp = new StringBuilder("SELECT ");
+temp.append(roleNameCol);
+temp.append(" FROM ");
+temp.append(userRoleTable);
+temp.append(" WHERE ");
+temp.append(roleNameCol);
+temp.append(" = ?");
+preparedRole = temp.toString();
 }
 
 } finally {

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



[tomcat] branch main updated: Add first pass at tests for the DataSource UserDatabase

2021-08-31 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 2da9e18  Add first pass at tests for the DataSource UserDatabase
2da9e18 is described below

commit 2da9e181f8251547425c9fe44b925dbb2f86b2a8
Author: remm 
AuthorDate: Tue Aug 31 21:37:47 2021 +0200

Add first pass at tests for the DataSource UserDatabase

Use a shortcut to allow independent testing without a real DataSource.
Test both the DataSourceRealm schema as well as the full schema with
groups.
Only glitch is that Derby leaves a derby.log, I haven't found how to
configure it away.
---
 .../users/DataSourceUserDatabaseTests.java | 228 +
 1 file changed, 228 insertions(+)

diff --git a/test/org/apache/catalina/users/DataSourceUserDatabaseTests.java 
b/test/org/apache/catalina/users/DataSourceUserDatabaseTests.java
new file mode 100644
index 000..5529917
--- /dev/null
+++ b/test/org/apache/catalina/users/DataSourceUserDatabaseTests.java
@@ -0,0 +1,228 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.catalina.users;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+import java.util.Iterator;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.catalina.Group;
+import org.apache.catalina.Role;
+import org.apache.catalina.User;
+import org.apache.catalina.startup.LoggingBaseTest;
+
+public class DataSourceUserDatabaseTests extends LoggingBaseTest {
+
+public static final String SIMPLE_SCHEMA =
+"create table users (\n"
++ "  user_name varchar(15) not null primary key,\n"
++ "  user_pass varchar(15) not null\n"
++ ");\n"
++ "create table user_roles (\n"
++ "  user_name varchar(15) not null,\n"
++ "  role_name varchar(15) not null,\n"
++ "  primary key (user_name, role_name)\n"
++ ");";
+
+public static final String FULL_SCHEMA =
+"create table users (\n"
++ "  user_name varchar(15) not null primary key,\n"
++ "  user_pass varchar(15) not null,\n"
++ "  user_fullname varchar(128)\n"
++ "  -- Add more attributes as needed\n"
++ ");\n"
++ "create table roles (\n"
++ "  role_name varchar(15) not null primary key,\n"
++ "  role_description  varchar(128)\n"
++ ");\n"
++ "create table groups (\n"
++ "  group_namevarchar(15) not null primary key,\n"
++ "  group_description varchar(128)\n"
++ ");\n"
++ "create table user_roles (\n"
++ "  user_name varchar(15) references users(user_name),\n"
++ "  role_name varchar(15) references roles(role_name),\n"
++ "  primary key (user_name, role_name)\n"
++ ");\n"
++ "create table user_groups (\n"
++ "  user_name varchar(15) references users(user_name),\n"
++ "  group_namevarchar(15) references 
groups(group_name),\n"
++ "  primary key (user_name, group_name)\n"
++ ");\n"
++ "create table group_roles (\n"
++ "  group_namevarchar(15) references 
groups(group_name),\n"
++ "  role_name varchar(15) references roles(role_name),\n"
++ "  primary key (group_name, role_name)\n"
++ ");";
+
+protected class DerbyUserDatabase extends DataSourceUserDatabase {
+protected final String name;
+protected Connection connection = null;
+public DerbyUserDatabase(String name) {
+super(null, "tomcat");
+this.name = "/" + name;
+}
+@Override
+protected Connection openConnection() {
+// Replace DataSource use and JNDI access with direct Derby
+// connection
+return connectio

Re: Tagging 10.1.0-M5 etc

2021-08-31 Thread Rémy Maucherat
On Tue, Aug 31, 2021 at 8:02 PM Mark Thomas  wrote:
>
> Hi all,
>
> Things are looking good for the September release. We do need the Tomcat
> Native 1.2.31 vote to complete first (thanks for your vote Rémy). If you
> have time to test with 1.2.31 your vote would be really helpful as we
> only have 2 votes so far.
>
> Assuming 1.2.31 passes, I'll complete the release then update the Tomcat
> branches, test and then tag. If everything goes well, we should have
> release votes running by the end of the week and hopefully a little sooner.

Ok. Should I backport the UserDatabase changes ? They are rather
independent of anything else.

Rémy

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



Re: OT: Parsing EC private keys in PEM format

2021-08-31 Thread Emmanuel Bourg
Le 26/08/2021 à 12:08, Mark Thomas a écrit :

> Hmm. Odd. I wonder why they said that. Do you have a public reference to
> that conversation. Obviously, any potential IP issues are a concern.
> 
> Looking at the code, I'm struggling to see where the concern would come
> from.
> 
> The original contribution was from Emmanuel. Given his work on JSign I
> have no reason to think the contribution wasn't original.

Note that Jsign doesn't share the PEM parsing code I contributed to
Tomcat, it uses the PEMParser class [1] from BouncyCastle which handles
more formats (in a very different way).

BouncyCastle being released under the MIT license, maybe their parser
could better fit the PostgreSQL needs?

Emmanuel Bourg

[1]
https://github.com/bcgit/bc-java/blob/master/pkix/src/main/java/org/bouncycastle/openssl/PEMParser.java

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



Re: [VOTE] Release Apache Tomcat Native 1.2.31

2021-08-31 Thread Igal Sapir
On Thu, Aug 26, 2021 at 9:04 AM Mark Thomas  wrote:

> Version 1.2.31 includes the following changes compared to 1.2.30
>
> - Build an issue when building with OpenSSL 3.0.0
>
> - Clean up remaining reference to pkg-config
>
> The proposed release artefacts can be found at [1],
> and the build was done using tag [2].
>
> The Apache Tomcat Native 1.2.31 release is
>   [X] Stable, go ahead and release
>   [ ] Broken because of ...
>

+1

Igal



> Thanks,
>
> Mark
>
>
> [1]
>
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/1.2.31
> [2]
>
> https://gitbox.apache.org/repos/asf?p=tomcat-native.git;a=commit;h=7e16cd817767bfc1be9fd854728d97641928702f
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>