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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 96ae1aec91 Remove useless sync
96ae1aec91 is described below

commit 96ae1aec917e6633e57cea0b86dce0350db888a4
Author: remm <r...@apache.org>
AuthorDate: Wed Jan 17 17:29:30 2024 +0100

    Remove useless sync
    
    init is called right after the constructor before using the object.
    Nothing actually syncs on the same lock as the one on destroy.
    Found by coverity.
---
 java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
index cac88badf7..00b3ddacc3 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -198,7 +198,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 
 
     @Override
-    public synchronized void destroy() {
+    public void destroy() {
         cleanable.clean();
     }
 
@@ -297,7 +297,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
      * @param sr Is not used for this implementation.
      */
     @Override
-    public synchronized void init(KeyManager[] kms, TrustManager[] tms, 
SecureRandom sr) {
+    public void init(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) {
         if (initialized) {
             log.warn(sm.getString("openssl.doubleInit"));
             return;


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

Reply via email to