X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fgeneral%2FThreadSpecificProxyFactory.java;h=ac1ec8fc09d7511b990fcf89b7b86c601b6e7f9c;hb=d0fbb5d20ae099950cf14670b9644aa9e42c3cb2;hp=81127009e4a6afc09993800789637a0001c78ce0;hpb=b96600229b48dcace7a4e9fc19a7014ee6ee7588;p=utils diff --git a/support/general/src/main/java/org/wamblee/general/ThreadSpecificProxyFactory.java b/support/general/src/main/java/org/wamblee/general/ThreadSpecificProxyFactory.java index 81127009..ac1ec8fc 100644 --- a/support/general/src/main/java/org/wamblee/general/ThreadSpecificProxyFactory.java +++ b/support/general/src/main/java/org/wamblee/general/ThreadSpecificProxyFactory.java @@ -37,7 +37,7 @@ import java.lang.reflect.Proxy; * method can be passed at construction of an object that will be used by * multiple threads. *

- * + * *

* This class is mostly used by infrastructure code (utilities) and test tools. *

@@ -48,6 +48,11 @@ import java.lang.reflect.Proxy; * distributed context where it can be sent to another JVM. *

* + *

+ * This class currently does not do any cleanup. So it should not be used in production code + * but only in test utilities. + *

+ * * @param T * Interface to proxy. * @author Erik Brakkee @@ -86,8 +91,8 @@ public class ThreadSpecificProxyFactory { } /** - * Constructs the factory with a callback to create thread-specific objects - * automatically. + * Constructs the factory with a callback to create thread-specific objects + * automatically. * * @param aClass * Interface class of the service to proxy. @@ -104,10 +109,10 @@ public class ThreadSpecificProxyFactory { svc = new ThreadLocal() { @Override protected T initialValue() { - if ( aCallback != null ) { + if (aCallback != null) { return aCallback.create(); } - return null; + return null; } }; clazz = aClass;