hoju 2005/05/23 23:07:45 Modified: src/java/org/apache/log4j PatternLayout.java PropertyConfigurator.java src/java/org/apache/log4j/filter ReflectionFilter.java src/java/org/apache/log4j/helpers OptionConverter.java RelativeTimeDateFormat.java Transform.java src/java/org/apache/log4j/joran/action Action.java JndiSubstitutionPropertyAction.java src/java/org/apache/log4j/net SMTPAppender.java src/java/org/apache/log4j/rolling/helper FileRenameAction.java src/java/org/apache/log4j/spi ComponentBase.java ErrorItem.java LoggerRepository.java LoggingEvent.java tests/src/java/org/apache/log4j/pattern PatternParserTest.java Log: Cleanup. Got rid of unnecesary imports on a few files, cleaned up javadoc to get rid of warnings, and got rid of 3 Java 5.0 "non-varargs" warnings which look like... warning: non-varargs call of varargs method with inexact argument type for last parameter; [javac] cast to java.lang.Object for a varargs call [javac] cast to java.lang.Object[] for a non-varargs call and to suppress this warning In those cases I cast to Object[] to supress the warnings. No code changes other than the Object[] casts, but that shouldn't affect anything. Jake Revision Changes Path 1.38 +1 -1 logging-log4j/src/java/org/apache/log4j/PatternLayout.java Index: PatternLayout.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/PatternLayout.java,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- PatternLayout.java 22 May 2005 07:56:22 -0000 1.37 +++ PatternLayout.java 24 May 2005 06:07:45 -0000 1.38 @@ -424,7 +424,7 @@ /** * Customized pattern conversion rules are stored under this key in the - * [EMAIL PROTECTED] LoggerRepository} object store. + * [EMAIL PROTECTED] org.apache.log4j.spi.LoggerRepository LoggerRepository} object store. */ public static final String PATTERN_RULE_REGISTRY = "PATTERN_RULE_REGISTRY"; 1.82 +1 -2 logging-log4j/src/java/org/apache/log4j/PropertyConfigurator.java Index: PropertyConfigurator.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/PropertyConfigurator.java,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- PropertyConfigurator.java 28 Apr 2005 16:33:16 -0000 1.81 +++ PropertyConfigurator.java 24 May 2005 06:07:45 -0000 1.82 @@ -63,8 +63,7 @@ <p>The <code>PropertyConfigurator</code> does not handle the advanced configuration features supported by the [EMAIL PROTECTED] org.apache.log4j.xml.DOMConfigurator DOMConfigurator} such as - support for [EMAIL PROTECTED] org.apache.log4j.spi.Filter Filters}, custom - [EMAIL PROTECTED] org.apache.log4j.spi.ErrorHandler ErrorHandlers}, nested + support for [EMAIL PROTECTED] org.apache.log4j.spi.Filter Filters}, nested appenders such as the [EMAIL PROTECTED] org.apache.log4j.AsyncAppender AsyncAppender}, etc. 1.2 +2 -2 logging-log4j/src/java/org/apache/log4j/filter/ReflectionFilter.java Index: ReflectionFilter.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/filter/ReflectionFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ReflectionFilter.java 3 Jan 2005 11:01:02 -0000 1.1 +++ ReflectionFilter.java 24 May 2005 06:07:45 -0000 1.2 @@ -60,9 +60,9 @@ props = Introspector.getBeanInfo(event.getMessage().getClass(), Object.class).getPropertyDescriptors(); for (int i=0;i<props.length;i++) { if ("message".equalsIgnoreCase(props[i].getName())) { - event.setRenderedMessage(props[i].getReadMethod().invoke(event.getMessage(), null).toString()); + event.setRenderedMessage(props[i].getReadMethod().invoke(event.getMessage(), (Object[]) null).toString()); } else { - eventProps.put(props[i].getName(), props[i].getReadMethod().invoke(event.getMessage(), null).toString()); + eventProps.put(props[i].getName(), props[i].getReadMethod().invoke(event.getMessage(), (Object[]) null).toString()); } } event.setProperties(eventProps); 1.56 +1 -1 logging-log4j/src/java/org/apache/log4j/helpers/OptionConverter.java Index: OptionConverter.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/helpers/OptionConverter.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- OptionConverter.java 18 Feb 2005 17:23:45 -0000 1.55 +++ OptionConverter.java 24 May 2005 06:07:45 -0000 1.56 @@ -541,7 +541,7 @@ configurator of [EMAIL PROTECTED] PropertyConfigurator} is used, unless the filename pointed to by <code>url</code> ends in '.xml', in which case [EMAIL PROTECTED] org.apache.log4j.xml.DOMConfigurator} is used. - @param hierarchy The [EMAIL PROTECTED] org.apache.log4j.Hierarchy} to act on. + @param repository The [EMAIL PROTECTED] LoggerRepository} to act on. @since 1.1.4 */ public static void selectAndConfigure( 1.7 +1 -1 logging-log4j/src/java/org/apache/log4j/helpers/RelativeTimeDateFormat.java Index: RelativeTimeDateFormat.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/helpers/RelativeTimeDateFormat.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RelativeTimeDateFormat.java 6 Jan 2005 17:03:10 -0000 1.6 +++ RelativeTimeDateFormat.java 24 May 2005 06:07:45 -0000 1.7 @@ -62,7 +62,7 @@ /** * Sets the timezone. - * @remarks Ignored by this formatter, but intercepted to prevent + * Ignored by this formatter, but intercepted to prevent * NullPointerException in superclass. * @param tz TimeZone timezone */ 1.7 +3 -4 logging-log4j/src/java/org/apache/log4j/helpers/Transform.java Index: Transform.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/helpers/Transform.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Transform.java 27 Feb 2004 16:47:31 -0000 1.6 +++ Transform.java 24 May 2005 06:07:45 -0000 1.7 @@ -39,10 +39,9 @@ * <b>, <table>, etc) and replaces any '<' and '>' * characters with respective predefined entity references. * - * @param input The text to be converted. - * @return The input string with the characters '<' and '>' replaced with - * &lt; and &gt; respectively. - * */ + * @param input The text to be converted. + * @param output the writer to which to write the modified input + */ public static void escapeTags(String input, Writer output) throws IOException { //Check if the string is null or zero length -- if so, return //what was sent in. 1.5 +0 -3 logging-log4j/src/java/org/apache/log4j/joran/action/Action.java Index: Action.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/joran/action/Action.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Action.java 24 Feb 2005 19:25:58 -0000 1.4 +++ Action.java 24 May 2005 06:07:45 -0000 1.5 @@ -20,9 +20,6 @@ import org.apache.log4j.joran.spi.ExecutionContext; import org.apache.log4j.joran.spi.Interpreter; import org.apache.log4j.spi.ComponentBase; -import org.apache.log4j.spi.LoggerRepository; -import org.apache.log4j.spi.ErrorItem; - import org.xml.sax.Attributes; import org.xml.sax.Locator; 1.5 +2 -2 logging-log4j/src/java/org/apache/log4j/joran/action/JndiSubstitutionPropertyAction.java Index: JndiSubstitutionPropertyAction.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/joran/action/JndiSubstitutionPropertyAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JndiSubstitutionPropertyAction.java 20 Jan 2005 14:45:53 -0000 1.4 +++ JndiSubstitutionPropertyAction.java 24 May 2005 06:07:45 -0000 1.5 @@ -71,7 +71,7 @@ } /** - * @see org.apache.joran.Action#begin. + * @see Action#begin */ public void begin( final ExecutionContext ec, final String name, final Attributes attributes) { @@ -112,7 +112,7 @@ } /** - * @see org.apache.joran.Action#end. + * @see Action#end */ public void end(final ExecutionContext ec, final String name) { } 1.52 +3 -4 logging-log4j/src/java/org/apache/log4j/net/SMTPAppender.java Index: SMTPAppender.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/net/SMTPAppender.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- SMTPAppender.java 22 May 2005 07:56:22 -0000 1.51 +++ SMTPAppender.java 24 May 2005 06:07:45 -0000 1.52 @@ -16,9 +16,9 @@ package org.apache.log4j.net; -import java.io.StringWriter; import java.util.Date; import java.util.Properties; + import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Multipart; @@ -29,19 +29,18 @@ import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMultipart; + import org.apache.log4j.AppenderSkeleton; import org.apache.log4j.Layout; import org.apache.log4j.Level; +import org.apache.log4j.PatternLayout; import org.apache.log4j.helpers.CyclicBuffer; import org.apache.log4j.helpers.OptionConverter; -import org.apache.log4j.pattern.PatternConverter; -import org.apache.log4j.pattern.PatternParser; import org.apache.log4j.rule.ExpressionRule; import org.apache.log4j.rule.Rule; import org.apache.log4j.spi.ComponentBase; import org.apache.log4j.spi.LoggingEvent; import org.apache.log4j.spi.TriggeringEventEvaluator; -import org.apache.log4j.PatternLayout; /** 1.2 +1 -1 logging-log4j/src/java/org/apache/log4j/rolling/helper/FileRenameAction.java Index: FileRenameAction.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/rolling/helper/FileRenameAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FileRenameAction.java 23 May 2005 23:51:01 -0000 1.1 +++ FileRenameAction.java 24 May 2005 06:07:45 -0000 1.2 @@ -81,7 +81,7 @@ } /** - * @{inheritDoc} + * @inheritDoc */ public void run() { execute(); 1.9 +1 -1 logging-log4j/src/java/org/apache/log4j/spi/ComponentBase.java Index: ComponentBase.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/spi/ComponentBase.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ComponentBase.java 12 May 2005 03:55:45 -0000 1.8 +++ ComponentBase.java 24 May 2005 06:07:45 -0000 1.9 @@ -60,7 +60,7 @@ * protected keyword. * * <p>In case the repository for this component is not set, - * this implementations returns a [EMAIL PROTECTED] SimpleLogger} instance. + * this implementations returns a [EMAIL PROTECTED] SimpleULogger} instance. * * @return A ULogger instance. */ 1.4 +1 -1 logging-log4j/src/java/org/apache/log4j/spi/ErrorItem.java Index: ErrorItem.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/spi/ErrorItem.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ErrorItem.java 12 Jan 2005 18:04:36 -0000 1.3 +++ ErrorItem.java 24 May 2005 06:07:45 -0000 1.4 @@ -20,7 +20,7 @@ /** * Used to store special log4j errors which cannot be logged using internal - * logging. Such errors include thos occuring during the initial phases + * logging. Such errors include those occurring during the initial phases * of log4j configuration or errors emanating from core components such as * Logger or Hierarchy. * 1.25 +5 -3 logging-log4j/src/java/org/apache/log4j/spi/LoggerRepository.java Index: LoggerRepository.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/spi/LoggerRepository.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- LoggerRepository.java 12 May 2005 12:36:28 -0000 1.24 +++ LoggerRepository.java 24 May 2005 06:07:45 -0000 1.25 @@ -206,14 +206,16 @@ public void setProperty(String key, String value); /** - * Errors which cannot be logged, go to the error list, + * Errors which cannot be logged, go to the error list + * * @return List */ public List getErrorList(); /** - * Errors which cannot be logged, go to the error list, - * @return List + * Errors which cannot be logged, go to the error list + * + * @param errorItem an ErrorItem to add to the error list */ public void addErrorItem(ErrorItem errorItem); 1.74 +1 -1 logging-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java Index: LoggingEvent.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- LoggingEvent.java 29 Dec 2004 12:02:33 -0000 1.73 +++ LoggingEvent.java 24 May 2005 06:07:45 -0000 1.74 @@ -761,7 +761,7 @@ } PARAM_ARRAY[0] = new Integer(p); - level = (Level)m.invoke(null, PARAM_ARRAY); + level = (Level)m.invoke(null, (Object[]) PARAM_ARRAY); } } catch (Exception e) { //LogLog.warn("Level deserialization failed, reverting to default.", e); 1.11 +16 -7 logging-log4j/tests/src/java/org/apache/log4j/pattern/PatternParserTest.java Index: PatternParserTest.java =================================================================== RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/log4j/pattern/PatternParserTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PatternParserTest.java 22 May 2005 07:56:23 -0000 1.10 +++ PatternParserTest.java 24 May 2005 06:07:45 -0000 1.11 @@ -16,17 +16,26 @@ package org.apache.log4j.pattern; -import junit.framework.Test; +import java.lang.reflect.Method; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; + import junit.framework.TestCase; -import junit.framework.TestSuite; -import org.apache.log4j.*; + +import org.apache.log4j.Layout; +import org.apache.log4j.Level; +import org.apache.log4j.LogManager; +import org.apache.log4j.Logger; +import org.apache.log4j.ULogger; import org.apache.log4j.spi.LoggerRepository; import org.apache.log4j.spi.LoggingEvent; -import java.lang.reflect.Method; -import java.text.SimpleDateFormat; -import java.util.*; - /** Test case for helpers/PatternParser.java. Tests the various
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]