[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Jimmy Wilson
jawilson at redhat.com
Sun Jun 24 17:17:26 EDT 2007
User: jawilson
Date: 07/06/24 17:17:26
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_4_0 CacheStoreInterceptor.java
CacheLoaderInterceptor.java
Log:
Fix for [JBCACHE-1103] (backport). Removed non-necessary try blocks due to finally block removal.
Revision Changes Path
No revision
No revision
1.26.2.5 +10 -25 JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheStoreInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java,v
retrieving revision 1.26.2.4
retrieving revision 1.26.2.5
diff -u -b -r1.26.2.4 -r1.26.2.5
--- CacheStoreInterceptor.java 24 Jun 2007 21:11:50 -0000 1.26.2.4
+++ CacheStoreInterceptor.java 24 Jun 2007 21:17:25 -0000 1.26.2.5
@@ -26,7 +26,7 @@
* Writes modifications back to the store on the way out: stores modifications back
* through the CacheLoader, either after each method call (no TXs), or at TX commit.
* @author Bela Ban
- * @version $Id: CacheStoreInterceptor.java,v 1.26.2.4 2007/06/24 21:11:50 jawilson Exp $
+ * @version $Id: CacheStoreInterceptor.java,v 1.26.2.5 2007/06/24 21:17:25 jawilson Exp $
*/
public class CacheStoreInterceptor extends Interceptor implements CacheStoreInterceptorMBean
{
@@ -145,26 +145,17 @@
{
case MethodDeclarations.removeNodeMethodLocal_id:
fqn=(Fqn)args[1];
- try
- {
loader.remove(fqn);
- }
break;
case MethodDeclarations.removeKeyMethodLocal_id:
fqn=(Fqn)args[1];
key=args[2];
- try
- {
tmp_retval=loader.remove(fqn, key);
use_tmp_retval=true;
- }
break;
case MethodDeclarations.removeDataMethodLocal_id:
fqn=(Fqn)args[1];
- try
- {
loader.removeData(fqn);
- }
break;
}
// }
@@ -181,10 +172,7 @@
log.debug(mod);
fqn = mod.getFqn();
- try
- {
loader.put(Collections.singletonList(mod));
- }
if (cache.getUseInterceptorMbeans()&& statsEnabled)
m_cacheStores++;
break;
@@ -192,11 +180,8 @@
fqn=(Fqn)args[1];
key=args[2];
value=args[3];
- try
- {
tmp_retval = loader.put(fqn, key, value);
use_tmp_retval = true;
- }
if (cache.getUseInterceptorMbeans()&& statsEnabled)
m_cacheStores++;
break;
1.40.2.7 +28 -34 JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
retrieving revision 1.40.2.6
retrieving revision 1.40.2.7
diff -u -b -r1.40.2.6 -r1.40.2.7
--- CacheLoaderInterceptor.java 24 Jun 2007 21:11:50 -0000 1.40.2.6
+++ CacheLoaderInterceptor.java 24 Jun 2007 21:17:25 -0000 1.40.2.7
@@ -29,7 +29,7 @@
* Loads nodes that don't exist at the time of the call into memory from the CacheLoader
*
* @author Bela Ban
- * @version $Id: CacheLoaderInterceptor.java,v 1.40.2.6 2007/06/24 21:11:50 jawilson Exp $
+ * @version $Id: CacheLoaderInterceptor.java,v 1.40.2.7 2007/06/24 21:17:25 jawilson Exp $
*/
public class CacheLoaderInterceptor extends Interceptor implements CacheLoaderInterceptorMBean
{
@@ -167,9 +167,6 @@
if (fqn != null)
{
- try
- {
-
DataNode n = cache.peek(fqn);
if (log.isTraceEnabled())
log.trace("load element " + fqn + " mustLoad=" + mustLoad(n, key));
@@ -201,9 +198,6 @@
loadChildren(fqn, n);
}
-
- }
-
}
return super.invoke(m);
More information about the jboss-cvs-commits
mailing list