--- a/usr/src/java/util/org/opensolaris/os/vp/util/misc/TextUtil.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/util/org/opensolaris/os/vp/util/misc/TextUtil.java Tue Jun 09 15:40:12 2009 -0700
@@ -42,7 +42,10 @@
}
/**
- * Returns the base portion of the name of the given class.
+ * Returns the base portion of the name of the given class. In
+ * constrast with the simple name, which is empty for anonymous
+ * classes and the Java identifier for local classes, this is the
+ * last component of the specified class's binary name.
*/
public static String getBaseName(Class clazz) {
return getClassBaseName(clazz.getName());
--- a/usr/src/java/vpanels/panels/sharemgr/org/opensolaris/os/vp/panels/sharemgr/client/swing/ProtocolOptionPropertyFactory.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/panels/sharemgr/org/opensolaris/os/vp/panels/sharemgr/client/swing/ProtocolOptionPropertyFactory.java Tue Jun 09 15:40:12 2009 -0700
@@ -71,9 +71,7 @@
String pName = protocol.getName();
String pkgName = ProtocolOptionPropertyFactory.class.getPackage().
getName();
-
- String baseName = TextUtil.getBaseName(
- ProtocolOptionPropertyFactory.class);
+ String baseName = ProtocolOptionPropertyFactory.class.getSimpleName();
String className = pkgName + "." + TextUtil.toJavaMethodName(pName) +
baseName;
--- a/usr/src/java/vpanels/panels/sharemgr/org/opensolaris/os/vp/panels/sharemgr/client/swing/SecurityOptionPropertyFactory.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/panels/sharemgr/org/opensolaris/os/vp/panels/sharemgr/client/swing/SecurityOptionPropertyFactory.java Tue Jun 09 15:40:12 2009 -0700
@@ -81,9 +81,7 @@
String pkgName = SecurityOptionPropertyFactory.class.getPackage().
getName() + ".";
-
- String baseName = TextUtil.getBaseName(
- SecurityOptionPropertyFactory.class);
+ String baseName = SecurityOptionPropertyFactory.class.getSimpleName();
String[] classNames = {
// First try protocol- and security-specific name
--- a/usr/src/java/vpanels/panels/sharemgr/org/opensolaris/os/vp/panels/sharemgr/server/module/Sharemgr.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/panels/sharemgr/org/opensolaris/os/vp/panels/sharemgr/server/module/Sharemgr.java Tue Jun 09 15:40:12 2009 -0700
@@ -36,8 +36,7 @@
{
private static final Logger logger = Logger.getLogger(
Sharemgr.class.getPackage().getName());
- private static final String LOGTAG = TextUtil.getBaseName(
- Sharemgr.class);
+ private static final String LOGTAG = Sharemgr.class.getSimpleName();
private static final int pollInterval_ = 10 * 1000; /* 10 seconds */
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/main/Repository.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/main/Repository.java Tue Jun 09 15:40:12 2009 -0700
@@ -29,7 +29,6 @@
import com.sun.cacao.DeploymentDescriptor;
import com.sun.cacao.webserver.WebServerRegistry;
import java.util.logging.*;
-import org.opensolaris.os.vp.util.misc.TextUtil;
public class Repository {
//
@@ -39,7 +38,7 @@
public static final Logger logger = Logger.getLogger(
Repository.class.getPackage().getName());
- private static final String LOGTAG = TextUtil.getBaseName(Repository.class);
+ private static final String LOGTAG = Repository.class.getSimpleName();
//
// Instance data
@@ -69,9 +68,8 @@
logger.entering(LOGTAG, "start");
try {
- Class clazz = getClass();
- servletName = TextUtil.getBaseName(clazz);
- String servletClass = clazz.getName();
+ servletName = RepositoryServlet.class.getSimpleName();
+ String servletClass = RepositoryServlet.class.getName();
String servletPath = urlPath;
String servletDesc = "Visual Panels secured code repository";
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/main/RepositoryServlet.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/main/RepositoryServlet.java Tue Jun 09 15:40:12 2009 -0700
@@ -30,7 +30,6 @@
import javax.servlet.*;
import javax.servlet.http.*;
import org.opensolaris.os.vp.server.common.PanelConfig;
-import org.opensolaris.os.vp.util.misc.TextUtil;
@SuppressWarnings({"serial"})
public class RepositoryServlet extends HttpServlet {
@@ -51,8 +50,8 @@
public static final String PARAM_COMPONENT = "component";
public static final String PARAM_PANEL = "panel";
- private static final String LOGTAG = TextUtil.getBaseName(
- RepositoryServlet.class);
+ private static final String LOGTAG =
+ RepositoryServlet.class.getSimpleName();
private PanelConfig config_;
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/main/VSystem.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/main/VSystem.java Tue Jun 09 15:40:12 2009 -0700
@@ -26,22 +26,13 @@
package org.opensolaris.os.vp.server.module.main;
-import java.security.*;
import java.util.Set;
-import javax.security.auth.Subject;
import org.opensolaris.os.vp.common.panel.*;
import org.opensolaris.os.vp.server.common.*;
import org.opensolaris.os.vp.util.jmx.auth.LocalPrincipal;
-import org.opensolaris.os.vp.util.misc.TextUtil;
public class VSystem implements VSystemMXBean {
//
- // Static data
- //
-
- private final static String LOGTAG = TextUtil.getBaseName(VSystem.class);
-
- //
// Instance data
//
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/main/VisualPanelsModule.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/main/VisualPanelsModule.java Tue Jun 09 15:40:12 2009 -0700
@@ -37,7 +37,6 @@
import org.opensolaris.os.vp.common.panel.VSystemMXBean;
import org.opensolaris.os.vp.common.proxy.BeanGenDesc;
import org.opensolaris.os.vp.server.common.*;
-import org.opensolaris.os.vp.util.misc.TextUtil;
public class VisualPanelsModule extends Module {
//
@@ -46,9 +45,8 @@
public static final Logger logger = Logger.getLogger(
VisualPanelsModule.class.getPackage().getName());
-
- private static final String LOGTAG = TextUtil.getBaseName(
- VisualPanelsModule.class);
+ private static final String LOGTAG =
+ VisualPanelsModule.class.getSimpleName();
private static final HashSet<File> VP_STD = new HashSet<File>();
static {
@@ -62,7 +60,7 @@
//
private ObjectName appObjectName;
private Repository repository;
- private Set<String> modules_ = new HashSet<String>();
+ private final Set<String> modules_ = new HashSet<String>();
private ModuleLifecycleManagerMBean lcmb_;
//
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/MBSCInterceptor.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/MBSCInterceptor.java Tue Jun 09 15:40:12 2009 -0700
@@ -33,7 +33,6 @@
import java.util.logging.*;
import javax.management.*;
import org.opensolaris.os.vp.common.proxy.BeanGenDesc;
-import org.opensolaris.os.vp.util.misc.TextUtil;
/*
* XXX: This shouldn't be a subclass of ProxyInstance. It was
@@ -49,10 +48,10 @@
*/
class MBSCInterceptor extends ProxyInstance implements MBeanServerInterceptor
{
- public static final Logger logger = Logger.getLogger(
+ private static final Logger logger = Logger.getLogger(
MBSCInterceptor.class.getPackage().getName());
private static final String LOGTAG =
- TextUtil.getBaseName(MBSCInterceptor.class);
+ MBSCInterceptor.class.getSimpleName();
private static final int MAX_RESTART = 10;
/*
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/ProxyInstance.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/ProxyInstance.java Tue Jun 09 15:40:12 2009 -0700
@@ -34,14 +34,13 @@
import javax.management.remote.*;
import org.opensolaris.os.vp.common.proxy.*;
import org.opensolaris.os.vp.util.jmx.connector.PTPConnector;
-import org.opensolaris.os.vp.util.misc.TextUtil;
class ProxyInstance
{
- public static final Logger logger = Logger.getLogger(
- MBSCInterceptor.class.getPackage().getName());
+ private static final Logger logger = Logger.getLogger(
+ ProxyInstance.class.getPackage().getName());
private static final String LOGTAG =
- TextUtil.getBaseName(MBSCInterceptor.class);
+ ProxyInstance.class.getSimpleName();
/*
* Static fields
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/ProxyInterceptor.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/ProxyInterceptor.java Tue Jun 09 15:40:12 2009 -0700
@@ -34,8 +34,6 @@
import java.util.*;
import java.util.logging.Logger;
import javax.management.*;
-import javax.security.auth.Subject;
-import org.opensolaris.os.vp.util.misc.TextUtil;
/**
* This class is an MBeanServerInterceptor that forwards all requests
@@ -52,7 +50,7 @@
public static final Logger logger = Logger.getLogger(
ProxyInterceptor.class.getPackage().getName());
private static final String LOGTAG =
- TextUtil.getBaseName(ProxyInterceptor.class);
+ ProxyInterceptor.class.getSimpleName();
/*
* Instance variables
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/ProxyManager.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/ProxyManager.java Tue Jun 09 15:40:12 2009 -0700
@@ -38,8 +38,7 @@
{
public static final Logger logger = Logger.getLogger(
ProxyManager.class.getPackage().getName());
- private static final String LOGTAG =
- TextUtil.getBaseName(ProxyManager.class);
+ private static final String LOGTAG = ProxyManager.class.getSimpleName();
private Map<String, MBSCInterceptor> proxies_ =
new HashMap<String, MBSCInterceptor>();
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/ProxyModule.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/proxy/ProxyModule.java Tue Jun 09 15:40:12 2009 -0700
@@ -33,7 +33,6 @@
import javax.management.*;
import org.opensolaris.os.vp.common.panel.MBeanUtil;
import org.opensolaris.os.vp.common.proxy.BeanGenDesc;
-import org.opensolaris.os.vp.util.misc.TextUtil;
public class ProxyModule extends Module
{
@@ -43,8 +42,7 @@
public static final Logger logger = Logger.getLogger(
ProxyModule.class.getPackage().getName());
- private static final String LOGTAG =
- TextUtil.getBaseName(ProxyModule.class);
+ private static final String LOGTAG = ProxyModule.class.getSimpleName();
private static ProxyModule instance;
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/session/SessionAuthModule.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/session/SessionAuthModule.java Tue Jun 09 15:40:12 2009 -0700
@@ -30,7 +30,6 @@
import com.sun.cacao.agent.auth.CacaoCallbackHandler;
import java.util.logging.*;
import javax.management.ObjectName;
-import org.opensolaris.os.vp.util.misc.TextUtil;
/**
* A module providing a Session Authentication mechanism, allowing an
@@ -51,10 +50,9 @@
private static final Logger logger = Logger.getLogger(
SessionAuthModule.class.getPackage().getName());
private final static String logTag =
- TextUtil.getBaseName(SessionAuthModule.class);
+ SessionAuthModule.class.getSimpleName();
/* Internal references */
- private ObjectName objectName;
private SessionMechanism sessionMechanism;
/**
--- a/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/uds/UDSConnectorModule.java Tue Jun 09 11:30:51 2009 -0400
+++ b/usr/src/java/vpanels/server/org/opensolaris/os/vp/server/module/uds/UDSConnectorModule.java Tue Jun 09 15:40:12 2009 -0700
@@ -30,13 +30,11 @@
import com.sun.cacao.common.instrum.InstrumDefaultForwarderMBean;
import com.sun.cacao.common.instrum.impl.InstrumDefaultForwarder;
import com.sun.cacao.element.*;
-import java.util.*;
import java.util.logging.*;
import javax.management.*;
import javax.management.remote.*;
import org.opensolaris.os.vp.util.jmx.auth.LocalPrincipal;
import org.opensolaris.os.vp.util.jmx.connector.UDSConnector;
-import org.opensolaris.os.vp.util.misc.TextUtil;
public class UDSConnectorModule extends Module {
//
@@ -45,9 +43,8 @@
public static final Logger logger = Logger.getLogger(
UDSConnectorModule.class.getPackage().getName());
-
private static final String LOGTAG =
- TextUtil.getBaseName(UDSConnectorModule.class);
+ UDSConnectorModule.class.getSimpleName();
//
// Instance data