You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Calvin Yu <cy...@yahoo.com> on 2002/02/21 20:17:22 UTC

[logging][PATCH] Applet Compatibility

The following patch allowed commons-logging to run in an applet 
environment without having to sign my applets.

Calvin


Index: LogFactoryImpl.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v
retrieving revision 1.4
diff -r1.4 LogFactoryImpl.java
389,391d388
<             if (logClassName == null) {
<                 logClassName = LOG_DEFAULT;
<             }
393a391,393
 >         if (logClassName == null) {
 >             logClassName = LOG_DEFAULT;
 >         }

Index: SimpleLog.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/SimpleLog.java,v
retrieving revision 1.2
diff -r1.2 SimpleLog.java
158,163c158,165
<         // add all system props that start with the specified prefix
<         Enumeration enum = System.getProperties().propertyNames();
<         while(enum.hasMoreElements()) {
<             String name = (String)(enum.nextElement());
<             if(null != name && name.startsWith(systemPrefix)) {
<                 simpleLogProps.setProperty(name,System.getProperty(name));
---
 >         try {
 >             // add all system props that start with the specified prefix
 >             Enumeration enum = System.getProperties().propertyNames();
 >             while(enum.hasMoreElements()) {
 >                 String name = (String)(enum.nextElement());
 >                 if(null != name && name.startsWith(systemPrefix)) {
 >                     
simpleLogProps.setProperty(name,System.getProperty(name));
 >                 }
164a167
 >         } catch (SecurityException e) {


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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