avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-logkit/src/java/org/apache/log/util StackIntrospector.java
Date Mon, 20 May 2002 10:12:50 GMT
donaldp     02/05/20 03:12:50

  Modified:    src/compat/org/apache/log ContextStack.java
               src/java/org/apache/log ContextMap.java LogEvent.java
                        Logger.java Priority.java
               src/java/org/apache/log/format ExtendedPatternFormatter.java
                        PatternFormatter.java
               src/java/org/apache/log/output/db ColumnType.java
               src/java/org/apache/log/output/io/rotate
                        RevolvingFileStrategy.java
               src/java/org/apache/log/output/jms PropertyType.java
               src/java/org/apache/log/util StackIntrospector.java
  Log:
  final static --> static final to fit in with JLS specs.
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-avalon-logkit/src/compat/org/apache/log/ContextStack.java
  
  Index: ContextStack.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/compat/org/apache/log/ContextStack.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextStack.java	27 Mar 2002 22:07:56 -0000	1.3
  +++ ContextStack.java	20 May 2002 10:12:49 -0000	1.4
  @@ -37,7 +37,7 @@
        *
        * @return the current ContextStack
        */
  -    public final static ContextStack getCurrentContext()
  +    public static final ContextStack getCurrentContext()
       {
           return getCurrentContext( true );
       }
  @@ -52,7 +52,7 @@
        * @param autocreate true if a ContextStack is to be created if it doesn't exist
        * @return the current ContextStack
        */
  -    final static ContextStack getCurrentContext( final boolean autocreate )
  +    static final ContextStack getCurrentContext( final boolean autocreate )
       {
           ContextStack context = (ContextStack)c_context.get();
   
  
  
  
  1.9       +3 -3      jakarta-avalon-logkit/src/java/org/apache/log/ContextMap.java
  
  Index: ContextMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/ContextMap.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ContextMap.java	18 Apr 2002 20:16:13 -0000	1.8
  +++ ContextMap.java	20 May 2002 10:12:49 -0000	1.9
  @@ -51,7 +51,7 @@
        *
        * @return the current ContextMap
        */
  -    public final static ContextMap getCurrentContext()
  +    public static final ContextMap getCurrentContext()
       {
           return getCurrentContext( true );
       }
  @@ -65,7 +65,7 @@
        * @param autocreate true if a ContextMap is to be created if it doesn't exist
        * @return the current ContextMap
        */
  -    public final static ContextMap getCurrentContext( final boolean autocreate )
  +    public static final ContextMap getCurrentContext( final boolean autocreate )
       {
           //Check security permission here???
           ContextMap context = (ContextMap)c_context.get();
  @@ -84,7 +84,7 @@
        *
        * @param context the context map (may be null)
        */
  -    public final static void bind( final ContextMap context )
  +    public static final void bind( final ContextMap context )
       {
           //Check security permission here??
           c_context.set( context );
  
  
  
  1.11      +1 -1      jakarta-avalon-logkit/src/java/org/apache/log/LogEvent.java
  
  Index: LogEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/LogEvent.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LogEvent.java	27 Mar 2002 22:07:56 -0000	1.10
  +++ LogEvent.java	20 May 2002 10:12:49 -0000	1.11
  @@ -21,7 +21,7 @@
       implements Serializable
   {
       //A Constant used when retrieving time relative to start of applicaiton start
  -    private final static long START_TIME = System.currentTimeMillis();
  +    private static final long START_TIME = System.currentTimeMillis();
   
       ///The category that this LogEvent concerns. (Must not be null)
       private String m_category;
  
  
  
  1.25      +1 -1      jakarta-avalon-logkit/src/java/org/apache/log/Logger.java
  
  Index: Logger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/Logger.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Logger.java	20 May 2002 10:02:26 -0000	1.24
  +++ Logger.java	20 May 2002 10:12:49 -0000	1.25
  @@ -15,7 +15,7 @@
   public class Logger
   {
       ///Separator character use to separate different categories
  -    public final static char CATEGORY_SEPARATOR = '.';
  +    public static final char CATEGORY_SEPARATOR = '.';
   
       ///The ErrorHandler associated with Logger
       private final ErrorHandler m_errorHandler;
  
  
  
  1.12      +5 -5      jakarta-avalon-logkit/src/java/org/apache/log/Priority.java
  
  Index: Priority.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/Priority.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Priority.java	27 Mar 2002 22:07:56 -0000	1.11
  +++ Priority.java	20 May 2002 10:12:49 -0000	1.12
  @@ -21,29 +21,29 @@
       /**
        * Developer orientated messages, usually used during development of product.
        */
  -    public final static Priority DEBUG = new Priority( "DEBUG", 5 );
  +    public static final Priority DEBUG = new Priority( "DEBUG", 5 );
   
       /**
        * Useful information messages such as state changes, client connection, user login
etc.
        */
  -    public final static Priority INFO = new Priority( "INFO", 10 );
  +    public static final Priority INFO = new Priority( "INFO", 10 );
   
       /**
        * A problem or conflict has occurred but it may be recoverable, then
        * again it could be the start of the system failing.
        */
  -    public final static Priority WARN = new Priority( "WARN", 15 );
  +    public static final Priority WARN = new Priority( "WARN", 15 );
   
       /**
        * A problem has occurred but it is not fatal. The system will still function.
        */
  -    public final static Priority ERROR = new Priority( "ERROR", 20 );
  +    public static final Priority ERROR = new Priority( "ERROR", 20 );
   
       /**
        * Something caused whole system to fail. This indicates that an administrator
        * should restart the system and try to fix the problem that caused the failure.
        */
  -    public final static Priority FATAL_ERROR = new Priority( "FATAL_ERROR", 25 );
  +    public static final Priority FATAL_ERROR = new Priority( "FATAL_ERROR", 25 );
   
       private final String m_name;
       private final int m_priority;
  
  
  
  1.5       +5 -5      jakarta-avalon-logkit/src/java/org/apache/log/format/ExtendedPatternFormatter.java
  
  Index: ExtendedPatternFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/format/ExtendedPatternFormatter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ExtendedPatternFormatter.java	27 Mar 2002 22:07:56 -0000	1.4
  +++ ExtendedPatternFormatter.java	20 May 2002 10:12:50 -0000	1.5
  @@ -24,16 +24,16 @@
    * information dynamically.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version CVS $Revision: 1.4 $ $Date: 2002/03/27 22:07:56 $
  + * @version CVS $Revision: 1.5 $ $Date: 2002/05/20 10:12:50 $
    */
   public class ExtendedPatternFormatter
       extends PatternFormatter
   {
  -    private final static int TYPE_METHOD = MAX_TYPE + 1;
  -    private final static int TYPE_THREAD = MAX_TYPE + 2;
  +    private static final int TYPE_METHOD = MAX_TYPE + 1;
  +    private static final int TYPE_THREAD = MAX_TYPE + 2;
   
  -    private final static String TYPE_METHOD_STR = "method";
  -    private final static String TYPE_THREAD_STR = "thread";
  +    private static final String TYPE_METHOD_STR = "method";
  +    private static final String TYPE_THREAD_STR = "thread";
   
       public ExtendedPatternFormatter( final String format )
       {
  
  
  
  1.29      +27 -27    jakarta-avalon-logkit/src/java/org/apache/log/format/PatternFormatter.java
  
  Index: PatternFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/format/PatternFormatter.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- PatternFormatter.java	7 Apr 2002 05:09:45 -0000	1.28
  +++ PatternFormatter.java	20 May 2002 10:12:50 -0000	1.29
  @@ -100,43 +100,43 @@
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
    * @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
  - * @version CVS $Revision: 1.28 $ $Date: 2002/04/07 05:09:45 $
  + * @version CVS $Revision: 1.29 $ $Date: 2002/05/20 10:12:50 $
    */
   public class PatternFormatter
       implements Formatter, org.apache.log.Formatter
   {
  -    private final static int TYPE_TEXT = 1;
  -    private final static int TYPE_CATEGORY = 2;
  -    private final static int TYPE_CONTEXT = 3;
  -    private final static int TYPE_MESSAGE = 4;
  -    private final static int TYPE_TIME = 5;
  -    private final static int TYPE_RELATIVE_TIME = 6;
  -    private final static int TYPE_THROWABLE = 7;
  -    private final static int TYPE_PRIORITY = 8;
  -    private final static int TYPE_THREAD = 9;
  +    private static final int TYPE_TEXT = 1;
  +    private static final int TYPE_CATEGORY = 2;
  +    private static final int TYPE_CONTEXT = 3;
  +    private static final int TYPE_MESSAGE = 4;
  +    private static final int TYPE_TIME = 5;
  +    private static final int TYPE_RELATIVE_TIME = 6;
  +    private static final int TYPE_THROWABLE = 7;
  +    private static final int TYPE_PRIORITY = 8;
  +    private static final int TYPE_THREAD = 9;
   
       /**
        * The maximum value used for TYPEs. Subclasses can define their own TYPEs
        * starting at <code>MAX_TYPE + 1</code>.
        */
  -    protected final static int MAX_TYPE = TYPE_PRIORITY;
  +    protected static final int MAX_TYPE = TYPE_PRIORITY;
   
  -    private final static String TYPE_CATEGORY_STR = "category";
  -    private final static String TYPE_CONTEXT_STR = "context";
  -    private final static String TYPE_MESSAGE_STR = "message";
  -    private final static String TYPE_TIME_STR = "time";
  -    private final static String TYPE_RELATIVE_TIME_STR = "rtime";
  -    private final static String TYPE_THROWABLE_STR = "throwable";
  -    private final static String TYPE_PRIORITY_STR = "priority";
  -    private final static String TYPE_THREAD_STR = "thread";
  -
  -    private final static String SPACE_16 = "                ";
  -    private final static String SPACE_8 = "        ";
  -    private final static String SPACE_4 = "    ";
  -    private final static String SPACE_2 = "  ";
  -    private final static String SPACE_1 = " ";
  +    private static final String TYPE_CATEGORY_STR = "category";
  +    private static final String TYPE_CONTEXT_STR = "context";
  +    private static final String TYPE_MESSAGE_STR = "message";
  +    private static final String TYPE_TIME_STR = "time";
  +    private static final String TYPE_RELATIVE_TIME_STR = "rtime";
  +    private static final String TYPE_THROWABLE_STR = "throwable";
  +    private static final String TYPE_PRIORITY_STR = "priority";
  +    private static final String TYPE_THREAD_STR = "thread";
  +
  +    private static final String SPACE_16 = "                ";
  +    private static final String SPACE_8 = "        ";
  +    private static final String SPACE_4 = "    ";
  +    private static final String SPACE_2 = "  ";
  +    private static final String SPACE_1 = " ";
   
  -    private final static String EOL = System.getProperty( "line.separator", "\n" );
  +    private static final String EOL = System.getProperty( "line.separator", "\n" );
   
       protected static class PatternRun
       {
  @@ -471,7 +471,7 @@
                   {
                       return getContextMap( event.getContextMap(), run.m_format );
                   }
  -                
  +
               case TYPE_THREAD:
                   return getThread( run.m_format );
   
  
  
  
  1.4       +23 -23    jakarta-avalon-logkit/src/java/org/apache/log/output/db/ColumnType.java
  
  Index: ColumnType.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/db/ColumnType.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ColumnType.java	27 Mar 2002 22:07:57 -0000	1.3
  +++ ColumnType.java	20 May 2002 10:12:50 -0000	1.4
  @@ -15,36 +15,36 @@
   public class ColumnType
   {
       //x-db sequencer...
  -    public final static int SEQUENCE = 0;
  +    public static final int SEQUENCE = 0;
   
  -    public final static int STATIC = 1;
  -    public final static int CATEGORY = 2;
  -    public final static int CONTEXT = 3;
  -    public final static int MESSAGE = 4;
  -    public final static int TIME = 5;
  -    public final static int RELATIVE_TIME = 6;
  -    public final static int THROWABLE = 7;
  -    public final static int PRIORITY = 8;
  -    public final static int HOSTNAME = 9;
  -    //public final static int     IPADDRESS       = 10;
  +    public static final int STATIC = 1;
  +    public static final int CATEGORY = 2;
  +    public static final int CONTEXT = 3;
  +    public static final int MESSAGE = 4;
  +    public static final int TIME = 5;
  +    public static final int RELATIVE_TIME = 6;
  +    public static final int THROWABLE = 7;
  +    public static final int PRIORITY = 8;
  +    public static final int HOSTNAME = 9;
  +    //public static final int     IPADDRESS       = 10;
   
       /**
        * The maximum value used for TYPEs. Subclasses can define their own TYPEs
        * starting at <code>MAX_TYPE + 1</code>.
        */
  -    //public final static int     MAX_TYPE        = IPADDRESS;
  +    //public static final int     MAX_TYPE        = IPADDRESS;
   
  -    public final static String SEQUENCE_STR = "sequence";
  -    public final static String STATIC_STR = "static";
  -    public final static String CATEGORY_STR = "category";
  -    public final static String CONTEXT_STR = "context";
  -    public final static String MESSAGE_STR = "message";
  -    public final static String TIME_STR = "time";
  -    public final static String RELATIVE_TIME_STR = "rtime";
  -    public final static String THROWABLE_STR = "throwable";
  -    public final static String PRIORITY_STR = "priority";
  -    public final static String HOSTNAME_STR = "hostname";
  -    //public final static String  IPADDRESS_STR  = "ipaddress";
  +    public static final String SEQUENCE_STR = "sequence";
  +    public static final String STATIC_STR = "static";
  +    public static final String CATEGORY_STR = "category";
  +    public static final String CONTEXT_STR = "context";
  +    public static final String MESSAGE_STR = "message";
  +    public static final String TIME_STR = "time";
  +    public static final String RELATIVE_TIME_STR = "rtime";
  +    public static final String THROWABLE_STR = "throwable";
  +    public static final String PRIORITY_STR = "priority";
  +    public static final String HOSTNAME_STR = "hostname";
  +    //public static final String  IPADDRESS_STR  = "ipaddress";
   
   
       public static int getTypeIdFor( final String type )
  
  
  
  1.9       +1 -1      jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RevolvingFileStrategy.java
  
  Index: RevolvingFileStrategy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RevolvingFileStrategy.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RevolvingFileStrategy.java	18 Apr 2002 09:14:08 -0000	1.8
  +++ RevolvingFileStrategy.java	20 May 2002 10:12:50 -0000	1.9
  @@ -23,7 +23,7 @@
       implements FileStrategy
   {
       ///revolving suffix formatting pattern. ie. "'.'000000"
  -    private final static String PATTERN = "'.'000000";
  +    private static final String PATTERN = "'.'000000";
   
       ///a revolving suffix formatter
       private DecimalFormat m_decimalFormat;
  
  
  
  1.3       +16 -16    jakarta-avalon-logkit/src/java/org/apache/log/output/jms/PropertyType.java
  
  Index: PropertyType.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/jms/PropertyType.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PropertyType.java	27 Mar 2002 22:07:58 -0000	1.2
  +++ PropertyType.java	20 May 2002 10:12:50 -0000	1.3
  @@ -14,28 +14,28 @@
    */
   public class PropertyType
   {
  -    public final static int STATIC = 1;
  -    public final static int CATEGORY = 2;
  -    public final static int CONTEXT = 3;
  -    public final static int MESSAGE = 4;
  -    public final static int TIME = 5;
  -    public final static int RELATIVE_TIME = 6;
  -    public final static int THROWABLE = 7;
  -    public final static int PRIORITY = 8;
  +    public static final int STATIC = 1;
  +    public static final int CATEGORY = 2;
  +    public static final int CONTEXT = 3;
  +    public static final int MESSAGE = 4;
  +    public static final int TIME = 5;
  +    public static final int RELATIVE_TIME = 6;
  +    public static final int THROWABLE = 7;
  +    public static final int PRIORITY = 8;
   
       /**
        * The maximum value used for TYPEs. Subclasses can define their own TYPEs
        * starting at <code>MAX_TYPE + 1</code>.
        */
   
  -    public final static String STATIC_STR = "static";
  -    public final static String CATEGORY_STR = "category";
  -    public final static String CONTEXT_STR = "context";
  -    public final static String MESSAGE_STR = "message";
  -    public final static String TIME_STR = "time";
  -    public final static String RELATIVE_TIME_STR = "rtime";
  -    public final static String THROWABLE_STR = "throwable";
  -    public final static String PRIORITY_STR = "priority";
  +    public static final String STATIC_STR = "static";
  +    public static final String CATEGORY_STR = "category";
  +    public static final String CONTEXT_STR = "context";
  +    public static final String MESSAGE_STR = "message";
  +    public static final String TIME_STR = "time";
  +    public static final String RELATIVE_TIME_STR = "rtime";
  +    public static final String THROWABLE_STR = "throwable";
  +    public static final String PRIORITY_STR = "priority";
   
       public static int getTypeIdFor( final String type )
       {
  
  
  
  1.6       +5 -5      jakarta-avalon-logkit/src/java/org/apache/log/util/StackIntrospector.java
  
  Index: StackIntrospector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/util/StackIntrospector.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StackIntrospector.java	27 Mar 2002 22:07:58 -0000	1.5
  +++ StackIntrospector.java	20 May 2002 10:12:50 -0000	1.6
  @@ -15,7 +15,7 @@
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
    * @author <a href="mailto:stuart.roebuck@adolos.com">Stuart Roebuck</a>
  - * @version CVS $Revision: 1.5 $ $Date: 2002/03/27 22:07:58 $
  + * @version CVS $Revision: 1.6 $ $Date: 2002/05/20 10:12:50 $
    */
   public final class StackIntrospector
   {
  @@ -24,7 +24,7 @@
        * SecurityManager class provides it as a protected method, so
        * change it to public through a new method !
        */
  -    private final static class CallStack
  +    private static final class CallStack
           extends SecurityManager
       {
           /**
  @@ -79,7 +79,7 @@
        * @exception SecurityException if an existing SecurityManager disallows construction
        *            of another SecurityManager and thus blocks method results
        */
  -    public final static Class getCallerClass( final Class clazz )
  +    public static final Class getCallerClass( final Class clazz )
           throws SecurityException
       {
           final Class[] stack = getCallStack().get();
  @@ -105,7 +105,7 @@
        *
        * @return The method path name in the form "the.package.path.Method"
        */
  -    public final static String getCallerMethod( final Class clazz )
  +    public static final String getCallerMethod( final Class clazz )
       {
           final String className = clazz.getName();
   
  @@ -192,7 +192,7 @@
        *
        * @return The method path name in the form "the.package.path.Method"
        */
  -    public final static String getRecentStack( final Class clazz, int entries )
  +    public static final String getRecentStack( final Class clazz, int entries )
       {
           final String className = clazz.getName();
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message