commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Calvin Yu <cy...@yahoo.com>
Subject [logging][PATCH] Applet Compatibility
Date Thu, 21 Feb 2002 19:17:22 GMT

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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message