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 2015/01/30 15:23:01 UTC

svn commit: r1656022 - /tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java

Author: markt
Date: Fri Jan 30 14:23:00 2015
New Revision: 1656022

URL: http://svn.apache.org/r1656022
Log:
Clean-up

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java?rev=1656022&r1=1656021&r2=1656022&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java Fri Jan 30 14:23:00 2015
@@ -58,23 +58,12 @@ public abstract class SSLImplementation
             return getInstance();
 
         try {
-            // Workaround for the J2SE 1.4.x classloading problem (under
-            // Solaris).
-            // Class.forName(..) fails without creating class using new.
-            // This is an ugly workaround.
-            if (JSSEImplementationClass.equals(className)) {
-                return new org.apache.tomcat.util.net.jsse.JSSEImplementation();
-            }
             Class<?> clazz = Class.forName(className);
             return (SSLImplementation) clazz.newInstance();
         } catch (Exception e) {
             if (logger.isDebugEnabled())
-                logger
-                        .debug("Error loading SSL Implementation " + className,
-                                e);
-            throw new ClassNotFoundException(
-                    "Error loading SSL Implementation " + className + " :"
-                            + e.toString());
+                logger.debug("Error loading SSL Implementation " + className, e);
+            throw new ClassNotFoundException("Error loading SSL Implementation " + className, e);
         }
     }
 



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


Re: svn commit: r1656022 - /tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java

Posted by Mark Thomas <ma...@apache.org>.
On 03/02/2015 14:30, Christopher Schultz wrote:
> Mark,
> 
> On 1/30/15 9:23 AM, markt@apache.org wrote:
>> Author: markt
>> Date: Fri Jan 30 14:23:00 2015
>> New Revision: 1656022
>>
>> URL: http://svn.apache.org/r1656022
>> Log:
>> Clean-up
> 
> Good catch. There are very few places in Tomcat where there are
> workarounds for JVM bugs (except for the whole load-classes-on-startup
> thing, which is actually quite a good strategy). Are they easy to find?
> This one was well-documented, and could have been found by grep'ing for
> "J2SE". Any idea if others are lurking that can also easily be found?

There have only ever been a handful of these. I tend to remove them when
I see them if they clearly no longer apply. I don't know off the top of
my head what else might be left. Best guess would be to search for
"workaround", "work-around", "work around", "JVM bug" and similar.

Mark



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


Re: svn commit: r1656022 - /tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,

On 1/30/15 9:23 AM, markt@apache.org wrote:
> Author: markt
> Date: Fri Jan 30 14:23:00 2015
> New Revision: 1656022
> 
> URL: http://svn.apache.org/r1656022
> Log:
> Clean-up

Good catch. There are very few places in Tomcat where there are
workarounds for JVM bugs (except for the whole load-classes-on-startup
thing, which is actually quite a good strategy). Are they easy to find?
This one was well-documented, and could have been found by grep'ing for
"J2SE". Any idea if others are lurking that can also easily be found?

-chris

> Modified:
>     tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java
> 
> Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java?rev=1656022&r1=1656021&r2=1656022&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java (original)
> +++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java Fri Jan 30 14:23:00 2015
> @@ -58,23 +58,12 @@ public abstract class SSLImplementation
>              return getInstance();
>  
>          try {
> -            // Workaround for the J2SE 1.4.x classloading problem (under
> -            // Solaris).
> -            // Class.forName(..) fails without creating class using new.
> -            // This is an ugly workaround.
> -            if (JSSEImplementationClass.equals(className)) {
> -                return new org.apache.tomcat.util.net.jsse.JSSEImplementation();
> -            }
>              Class<?> clazz = Class.forName(className);
>              return (SSLImplementation) clazz.newInstance();
>          } catch (Exception e) {
>              if (logger.isDebugEnabled())
> -                logger
> -                        .debug("Error loading SSL Implementation " + className,
> -                                e);
> -            throw new ClassNotFoundException(
> -                    "Error loading SSL Implementation " + className + " :"
> -                            + e.toString());
> +                logger.debug("Error loading SSL Implementation " + className, e);
> +            throw new ClassNotFoundException("Error loading SSL Implementation " + className, e);
>          }
>      }
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>