You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by "Boutcher, James K." <JK...@West.com> on 2001/11/21 21:13:18 UTC

Exception cleanup on startup - and JLog

There was a lot of errors spitting out on the console at startup..
Didn't inspire confidence that much. I went though and cleaned it up..
Lots of issues where Class.forName was being called passing in null -
which was causing null pointer exceptions inside the Class, emm..
Class. :-)  With the changes I made, startup now is a silent process. 

I'm new to this, so I hope I'm submitting this the right way.. 

While I have this thread open (don't want to flood the list) - I looked
through many classes and saw a bunch of System.out and System.err
usage.. I *think* I read somewhere that this wasn't preferred, and we
should be using JLog.. Is this demonstrated anywhere? I'd like to follow
previous conventions if it is. If not, and this is the way this project
needs to move, I'll work on that next. :-)

Patches follow... Well, not patches I guess, but cvs diffs from a grab
about 3 hours ago.


Index: SSLManager.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/org/apache/jmeter/util/SSLManager.jav
a,v
retrieving revision 1.12
diff -r1.12 SSLManager.java
275a276,279
> 
>         SSLManager.isSSLSupported = false;
>         SSLManager.sslProvider = null;
> 
277c281,286
<             SSLManager.sslProvider =
(Provider)Class.forName(JMeterUtils.getPropDefault("ssl.provider",null))
.newInstance();
---
>             // Class.forName() was choking if the property wasn't set
on the line below..
>             String strSSLProvider =
JMeterUtils.getPropDefault("ssl.provider",null);
>             if(strSSLProvider != null) {
>                 SSLManager.sslProvider =
(Provider)Class.forName(strSSLProvider).newInstance();
>                 SSLManager.isSSLSupported = true;
>             }
280,281d288
<             SSLManager.isSSLSupported = false;
<             SSLManager.sslProvider = null;
285,286c292,294
<             System.out.println("SSL Provider is: " +
SSLManager.sslProvider);
<             Security.addProvider(SSLManager.sslProvider);
---
>             if(SSLManager.sslProvider != null) {
>                 System.out.println("SSL Provider is: " +
SSLManager.sslProvider);
>                 Security.addProvider(SSLManager.sslProvider);
287a296
>             }


Index: ClassFinder.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/org/apache/jmeter/util/ClassFinder.ja
va,v
retrieving revision 1.15
diff -r1.15 ClassFinder.java
1188a1189,1191
>                     // Class.forName() doesn't like nulls
>                     if(strClassName == null) continue;
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>