Author: boisvert
Date: Thu Jul 19 11:44:02 2007
New Revision: 557727

URL: http://svn.apache.org/viewvc?view=rev&rev=557727
Log:
Fix minor inefficiency -> use getClass().getSimpleName() instead of computing 
it from getName()

Modified:
    
incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/JacobObject.java

Modified: 
incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/JacobObject.java
URL: 
http://svn.apache.org/viewvc/incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/JacobObject.java?view=diff&rev=557727&r1=557726&r2=557727
==============================================================================
--- 
incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/JacobObject.java 
(original)
+++ 
incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/JacobObject.java 
Thu Jul 19 11:44:02 2007
@@ -35,15 +35,7 @@
      * Get the unadorned (no package) name of this class.
      */
     protected String getClassName() {
-        return getClassName(getClass());
-    }
-
-    /**
-     * Get the unadorned (no package) name of a class.
-     */
-    protected static String getClassName(Class clazz) {
-        String className = clazz.getName();
-        return (className.indexOf('.') == -1) ? className : 
className.substring(clazz.getPackage().getName().length() + 1);
+        return getClass().getSimpleName();
     }
 
     protected static Object getExtension(Class extensionClass) {
@@ -79,7 +71,7 @@
     protected <T extends Channel> T newChannel(Class<T> channelType, String 
description)
         throws IllegalArgumentException
     {
-        return (T) JacobVPU.activeJacobThread().newChannel(channelType, 
toString(), description);
+        return (T) JacobVPU.activeJacobThread().newChannel(channelType, 
getClassName(), description);
     }
 
     /**


Reply via email to