hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject cvs commit: jakarta-hivemind/jmx/src/test/org/apache/hivemind/management TestMBeanRegistry.java
Date Fri, 29 Apr 2005 01:47:33 GMT
jcarman     2005/04/28 18:47:33

  Modified:    jmx/src/test/org/apache/hivemind/management/log4j
                        TestLogManagementMBean.java
               jmx/src/java/org/apache/hivemind/management/log4j
                        LogManagementMBean.java
               jmx/src/test/org/apache/hivemind/management
                        TestMBeanRegistry.java
  Log:
  Cleaning up warnings in eclipse (unused imports and hidden fields).
  
  Revision  Changes    Path
  1.2       +4 -4      jakarta-hivemind/jmx/src/test/org/apache/hivemind/management/log4j/TestLogManagementMBean.java
  
  Index: TestLogManagementMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/jmx/src/test/org/apache/hivemind/management/log4j/TestLogManagementMBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestLogManagementMBean.java	16 Apr 2005 14:41:38 -0000	1.1
  +++ TestLogManagementMBean.java	29 Apr 2005 01:47:33 -0000	1.2
  @@ -115,22 +115,22 @@
   
                   private String getLoggerNameFromMBean(Object mbean) throws AssertionFailedError
                   {
  -                    String loggerName;
  +                    String logName;
                       try
                       {
                           if (mbean instanceof LoggerDynamicMBean)
                           {
                               LoggerDynamicMBean loggerDynamicMBean = (LoggerDynamicMBean)
mbean;
  -                            loggerName = (String) loggerDynamicMBean.getAttribute("name");
  +                            logName = (String) loggerDynamicMBean.getAttribute("name");
                           }
                           else
  -                            loggerName = (String) mbean;
  +                            logName = (String) mbean;
                       }
                       catch (Exception e)
                       {
                           throw new AssertionFailedError(e.getMessage());
                       }
  -                    return loggerName;
  +                    return logName;
                   }
   
                   public String toString(Object[] value)
  
  
  
  1.2       +10 -11    jakarta-hivemind/jmx/src/java/org/apache/hivemind/management/log4j/LogManagementMBean.java
  
  Index: LogManagementMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/jmx/src/java/org/apache/hivemind/management/log4j/LogManagementMBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LogManagementMBean.java	16 Apr 2005 14:41:38 -0000	1.1
  +++ LogManagementMBean.java	29 Apr 2005 01:47:33 -0000	1.2
  @@ -32,7 +32,6 @@
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.management.ObjectNameBuilder;
   import org.apache.hivemind.util.StringUtils;
  -import org.apache.log4j.Level;
   import org.apache.log4j.LogManager;
   import org.apache.log4j.Logger;
   import org.apache.log4j.helpers.OptionConverter;
  @@ -137,32 +136,32 @@
           }
           else
           {
  -            Logger logger = LogManager.getLogger(loggerPattern);
  -            addLoggerMBean(logger);
  +            Logger log = LogManager.getLogger(loggerPattern);
  +            addLoggerMBean(log);
           }
       }
   
       /**
        * Adds a MBean for a logger.
        * 
  -     * @param logger
  +     * @param log
        *            the logger
        * @return ObjectName of created MBean
        */
  -    protected ObjectName addLoggerMBean(Logger logger)
  +    protected ObjectName addLoggerMBean(Logger log)
       {
  -        String name = logger.getName();
  +        String name = log.getName();
           ObjectName objectname = null;
           try
           {
  -            LoggerDynamicMBean loggerMBean = new LoggerDynamicMBean(logger);
  +            LoggerDynamicMBean loggerMBean = new LoggerDynamicMBean(log);
               objectname = getObjectNameBuilder().createObjectName(name, OBJECT_NAME_TYPE);
               _mbeanserver.registerMBean(loggerMBean, objectname);
           }
           catch (InstanceAlreadyExistsException exception)
           {
               // just warn
  -            logger.warn("MBean for Logger " + logger.getName() + " already exists");
  +            log.warn("MBean for Logger " + log.getName() + " already exists");
           }
           catch (JMException exception)
           {
  @@ -197,9 +196,9 @@
           Enumeration loggers = LogManager.getCurrentLoggers();
           while (loggers.hasMoreElements())
           {
  -            Logger logger = (Logger) loggers.nextElement();
  -            if (isMatch(logger.getName(), loggerPattern))
  -                addLoggerMBean(logger);
  +            Logger log = (Logger) loggers.nextElement();
  +            if (isMatch(log.getName(), loggerPattern))
  +                addLoggerMBean(log);
           }
       }
   
  
  
  
  1.2       +0 -3      jakarta-hivemind/jmx/src/test/org/apache/hivemind/management/TestMBeanRegistry.java
  
  Index: TestMBeanRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/jmx/src/test/org/apache/hivemind/management/TestMBeanRegistry.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestMBeanRegistry.java	16 Apr 2005 14:41:38 -0000	1.1
  +++ TestMBeanRegistry.java	29 Apr 2005 01:47:33 -0000	1.2
  @@ -26,9 +26,6 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.hivemind.ErrorHandler;
   import org.apache.hivemind.Registry;
  -import org.apache.hivemind.impl.DefaultClassResolver;
  -import org.apache.hivemind.impl.ModuleImpl;
  -import org.apache.hivemind.internal.Module;
   import org.apache.hivemind.internal.ServicePoint;
   import org.apache.hivemind.management.impl.MBeanRegistrationContribution;
   import org.apache.hivemind.management.impl.MBeanRegistryImpl;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message