[tomcat] branch master updated (f8bae5e -> 66df2af)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[tomcat] branch master updated (f8bae5e -> 66df2af)

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

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


    from f8bae5e  Simplify
     new 9ead1c1  SpotBugs - Fix possible NPE
     new 8008253  SpotBugs - simplify
     new 66df2af  SpotBugs - Additional false positives when running with 4.1.4

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/org/apache/catalina/ha/backend/TcpSender.java |  2 +-
 java/org/apache/tomcat/util/net/NioEndpoint.java   |  2 +-
 res/findbugs/filter-false-positives.xml            | 46 +++++++++++++++++++++-
 3 files changed, 47 insertions(+), 3 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[tomcat] 01/03: SpotBugs - Fix possible NPE

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

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

commit 9ead1c192007318c7d9deb78d01f7eac5e801e3e
Author: Mark Thomas <[hidden email]>
AuthorDate: Fri Oct 16 14:21:52 2020 +0100

    SpotBugs - Fix possible NPE
---
 java/org/apache/catalina/ha/backend/TcpSender.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/ha/backend/TcpSender.java b/java/org/apache/catalina/ha/backend/TcpSender.java
index 5676c88..7e1bda9 100644
--- a/java/org/apache/catalina/ha/backend/TcpSender.java
+++ b/java/org/apache/catalina/ha/backend/TcpSender.java
@@ -151,7 +151,7 @@ public class TcpSender
                 // read all the headers.
                 String header = connectionReaders[i].readLine();
                 int contentLength = 0;
-                while (!header.isEmpty()) {
+                while (header != null && !header.isEmpty()) {
                     int colon = header.indexOf(':');
                     String headerName = header.substring(0, colon).trim();
                     String headerValue = header.substring(colon + 1).trim();


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[tomcat] 02/03: SpotBugs - simplify

markt
In reply to this post by markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 8008253814a14eb7985d85d85ef42700460975af
Author: Mark Thomas <[hidden email]>
AuthorDate: Fri Oct 16 14:27:46 2020 +0100

    SpotBugs - simplify
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java
index 527f38d..eaf7efe 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -571,7 +571,7 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel>
                                 cancelledKey(key, socketWrapper);
                             }
                         } else {
-                            cancelledKey(key, attachment);
+                            cancelledKey(key, null);
                         }
                     }
                 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[tomcat] 03/03: SpotBugs - Additional false positives when running with 4.1.4

markt
In reply to this post by markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 66df2af5047c682e259559e2e38c2d271c16b8fb
Author: Mark Thomas <[hidden email]>
AuthorDate: Fri Oct 16 14:29:29 2020 +0100

    SpotBugs - Additional false positives when running with 4.1.4
---
 res/findbugs/filter-false-positives.xml | 46 ++++++++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)

diff --git a/res/findbugs/filter-false-positives.xml b/res/findbugs/filter-false-positives.xml
index 2a44dd8..d4e0b03 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -17,6 +17,11 @@
 <FindBugsFilter>
   <!--  Considered to be false positives -->
   <Match>
+    <!-- Generated by compiler -->
+    <Field name="~\$SWITCH_TABLE\$.*"/>
+    <Bug pattern="VO_VOLATILE_REFERENCE_TO_ARRAY"/>
+  </Match>
+  <Match>
     <!-- Only base null is handled by this resolver -->
     <Class name="jakarta.el.BeanNameELResolver"/>
     <Or>
@@ -439,12 +444,15 @@
     <Bug code="VO" />
   </Match>
   <Match>
-    <!-- These fields should not be serialized with the session -->
     <Class name="org.apache.catalina.session.StandardSession" />
     <Or>
+      <!-- These fields should not be serialized with the session -->
       <Field name="listeners" />
       <Field name="notes" />
       <Field name="support" />
+      <!-- These fields are initialised from the Manager -->
+      <Field name="activityCheck" />
+      <Field name="lastAccessAtStart" />
     </Or>
     <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
   </Match>
@@ -518,6 +526,12 @@
     <Bug code="NP" />
   </Match>
   <Match>
+    <!-- Domain resolution not an issue here -->
+    <Class name="org.apache.catalina.startup.WebappServiceLoader" />
+    <Method name="load" />
+    <Bug pattern="DMI_COLLECTION_OF_URLS" />
+  </Match>
+  <Match>
     <!-- If old -> save worked, assume save -> old will to -->
     <Class name="org.apache.catalina.storeconfig.StoreFileMover" />
     <Method name="move" />
@@ -679,6 +693,12 @@
     <Bug code="RCN"/>
   </Match>
   <Match>
+    <!-- Syncs are there to protect state not context -->
+    <Class name="org.apache.catalina.valves.HealthCheckValve" />
+    <Field name="context" />
+    <Bug pattern="IS2_INCONSISTENT_SYNC" />
+  </Match>
+  <Match>
     <!-- Non-constant strings are configuration settings rather than client
          supplied -->
     <Class name="org.apache.catalina.valves.JDBCAccessLogValve" />
@@ -686,6 +706,15 @@
     <Bug code="SQL" />
   </Match>
   <Match>
+    <!-- NO-OPs due to remaining FIXMEs -->
+    <Class name="org.apache.catalina.valves.rewrite.ResolverImpl"/>
+    <Method name="resolveSsl"/>
+    <Or>
+      <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
+      <Bug pattern="RV_RETURN_VALUE_IGNORED"/>
+    </Or>
+  </Match>
+  <Match>
     <!-- request.getQueryString() can be null because
     o.a.t.util.buf.MessageBytes.toString() can return NULL -->
     <Class name="org.apache.catalina.valves.rewrite.RewriteValve"/>
@@ -1003,6 +1032,12 @@
     </Or>
   </Match>
   <Match>
+    <!-- Sync protects writing not reading -->
+    <Class name="org.apache.tomcat.dbcp.dbcp2.BasicDataSource" />
+    <Field name="closed" />
+    <Bug pattern="IS2_INCONSISTENT_SYNC" />
+  </Match>
+  <Match>
     <!-- Return value is never used -->
     <Class name="org.apache.tomcat.dbcp.dbcp2.DelegatingConnection" />
     <Method name="prepareStatement" />
@@ -1295,6 +1330,12 @@
     <Bug code="SF" />
   </Match>
   <Match>
+    <!-- Returns null by design -->
+    <Class name="org.apache.tomcat.util.http.parser.EntityTag" />
+     <Method name="compareEntityTag"/>
+    <Bug pattern="NP_BOOLEAN_RETURN_NULL" />
+  </Match>
+  <Match>
     <!-- Reader instance always accepts -ve skip values and there is -->
     <!-- always enough space to skip back the requested amount.      -->
     <Class name="org.apache.tomcat.util.http.parser.HttpParser" />
@@ -2138,6 +2179,9 @@
       <Method name="testEgMailingList04" />
       <Method name="testEgMailingList05" />
       <Method name="testQuote2" />
+      <Method name="testSpecIssue194a" />
+      <Method name="testSpecIssue194b" />
+      <Method name="testSpecIssue194c" />
     </Or>
     <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
   </Match>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]