You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2023/09/14 09:17:05 UTC

[tomcat] branch 9.0.x updated: Default to Object for type, just in case

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

remm 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 833040c7c4 Default to Object for type, just in case
833040c7c4 is described below

commit 833040c7c4d56ee72b13de5dd3601bae8b09b062
Author: remm <re...@apache.org>
AuthorDate: Thu Sep 14 11:14:45 2023 +0200

    Default to Object for type, just in case
    
    Found by coverity.
---
 java/org/apache/catalina/startup/WebAnnotationSet.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/org/apache/catalina/startup/WebAnnotationSet.java b/java/org/apache/catalina/startup/WebAnnotationSet.java
index 62bf6c32a0..87ffecf98f 100644
--- a/java/org/apache/catalina/startup/WebAnnotationSet.java
+++ b/java/org/apache/catalina/startup/WebAnnotationSet.java
@@ -425,6 +425,8 @@ public class WebAnnotationSet {
         if (type == null || type.equals(Object.class)) {
             if (defaultType != null) {
                 type = defaultType;
+            } else {
+                type = Object.class;
             }
         }
         return Introspection.convertPrimitiveType(type).getCanonicalName();


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