diff --git a/source/java/org/alfresco/repo/audit/PublicServiceIdentifier.java b/source/java/org/alfresco/repo/audit/PublicServiceIdentifier.java
index 1e521beedc..fcfc39a752 100644
--- a/source/java/org/alfresco/repo/audit/PublicServiceIdentifier.java
+++ b/source/java/org/alfresco/repo/audit/PublicServiceIdentifier.java
@@ -36,8 +36,9 @@ public interface PublicServiceIdentifier
/**
* Get the name of the public service for the method invocation.
*
- * @param mi
- * @return
+ * @param mi the method invocation
+ * @return Returns the name of the public service or null if it is
+ * not recognized as a public service
*/
public String getPublicServiceName(MethodInvocation mi);
}
diff --git a/source/java/org/alfresco/repo/audit/PublicServiceIdentifierImpl.java b/source/java/org/alfresco/repo/audit/PublicServiceIdentifierImpl.java
index 2d084edb25..866abb6503 100644
--- a/source/java/org/alfresco/repo/audit/PublicServiceIdentifierImpl.java
+++ b/source/java/org/alfresco/repo/audit/PublicServiceIdentifierImpl.java
@@ -39,15 +39,15 @@ import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.ListableBeanFactory;
/**
- * Identify public services by method invocation. Look ups are cached on a thread local as they are quite expensive. All public service names end with "Service" and start with
- * capital letter. This pattern is used to filter bean names. TODO: Look at pulling out all the mappings at start up.
+ * Identify public services by method invocation. Look ups are cached on a thread local as they are quite expensive.
+ * All public service names end with "Service" and start with capital letter.
+ * This pattern is used to filter bean names. TODO: Look at pulling out all the mappings at start up.
*
* @author Andy Hind
*/
public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, BeanFactoryAware
{
private static Log s_logger = LogFactory.getLog(PublicServiceIdentifierImpl.class);
-
private static ThreadLocal> methodToServiceMap = new ThreadLocal>();
private ListableBeanFactory beanFactory;
@@ -57,26 +57,19 @@ public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, Bea
super();
}
-
-
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
{
this.beanFactory = (ListableBeanFactory)beanFactory;
}
-
-
public String getPublicServiceName(MethodInvocation mi)
{
return getServiceName(mi);
}
/**
+ * {@inheritDoc}
* Cache service name look up.
- *
- * @param mi
- * @return
- * @throws BeansException
*/
private String getServiceName(MethodInvocation mi) throws BeansException
{
@@ -104,11 +97,9 @@ public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, Bea
/**
* Do the look up by interface type.
*
- * @param mi
- * @return
- * @throws BeansException
+ * @return Returns the name of the service or null if not found
*/
-
+ @SuppressWarnings("unchecked")
private String getServiceNameImpl(MethodInvocation mi) throws BeansException
{
Class clazz = mi.getThis().getClass();