[jboss-cvs] jboss-seam/src/test/misc/org/jboss/seam/test ...
Gavin King
gavin.king at jboss.com
Thu Feb 8 22:44:22 EST 2007
User: gavin
Date: 07/02/08 22:44:22
Modified: src/test/misc/org/jboss/seam/test InterceptorTest.java
Log:
optimize interceptor stack, much less stackframes
Revision Changes Path
1.28 +32 -32 jboss-seam/src/test/misc/org/jboss/seam/test/InterceptorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InterceptorTest.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/InterceptorTest.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- InterceptorTest.java 8 Jan 2007 22:52:31 -0000 1.27
+++ InterceptorTest.java 9 Feb 2007 03:44:22 -0000 1.28
@@ -1,4 +1,4 @@
-//$Id: InterceptorTest.java,v 1.27 2007/01/08 22:52:31 gavin Exp $
+//$Id: InterceptorTest.java,v 1.28 2007/02/09 03:44:22 gavin Exp $
package org.jboss.seam.test;
import java.lang.reflect.Method;
@@ -71,7 +71,7 @@
BijectionInterceptor bi = new BijectionInterceptor();
bi.setComponent( new Component(Bar.class, appContext) );
- String result = (String) bi.bijectComponent( new MockInvocationContext() {
+ String result = (String) bi.aroundInvoke( new MockInvocationContext() {
@Override
public Object getTarget()
{
@@ -103,7 +103,7 @@
throw new RuntimeException(e);
}
- bi.bijectComponent( new MockInvocationContext() {
+ bi.aroundInvoke( new MockInvocationContext() {
@Override
public Object getTarget()
{
@@ -129,7 +129,7 @@
try
{
Contexts.getSessionContext().remove("otherFoo");
- bi.bijectComponent( new MockInvocationContext() {
+ bi.aroundInvoke( new MockInvocationContext() {
@Override
public Object getTarget()
{
@@ -169,7 +169,7 @@
biba.setComponent( new Component(BrokenAction.class, appContext) );
try
{
- biba.bijectComponent( new MockInvocationContext() {
+ biba.aroundInvoke( new MockInvocationContext() {
@Override
public Object getTarget() {
@@ -208,7 +208,7 @@
final Action action = new Action();
BijectionInterceptor bia = new BijectionInterceptor();
bia.setComponent( new Component(Action.class, appContext) );
- result = (String) bia.bijectComponent( new MockInvocationContext() {
+ result = (String) bia.aroundInvoke( new MockInvocationContext() {
@Override
public Object getTarget() {
@@ -262,7 +262,7 @@
assert !Manager.instance().isLongRunningConversation();
- String result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ String result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -280,7 +280,7 @@
Manager.instance().initializeTemporaryConversation();
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -296,7 +296,7 @@
assert Manager.instance().isLongRunningConversation();
assert "begun".equals(result);
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -312,7 +312,7 @@
assert Manager.instance().isLongRunningConversation();
assert "foo".equals(result);
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -328,7 +328,7 @@
assert !Manager.instance().isLongRunningConversation();
assert "ended".equals(result);
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -344,7 +344,7 @@
assert !Manager.instance().isLongRunningConversation();
assert result==null;
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -360,7 +360,7 @@
assert Manager.instance().isLongRunningConversation();
assert result==null;
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -376,7 +376,7 @@
assert Manager.instance().isLongRunningConversation();
assert "foo".equals(result);
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -392,7 +392,7 @@
assert Manager.instance().isLongRunningConversation();
assert result==null;
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -408,7 +408,7 @@
assert !Manager.instance().isLongRunningConversation();
assert result==null;
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -424,7 +424,7 @@
assert !Manager.instance().isLongRunningConversation();
assert "failure".equals(result);
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -440,7 +440,7 @@
assert Manager.instance().isLongRunningConversation();
assert "success".equals(result);
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -456,7 +456,7 @@
assert Manager.instance().isLongRunningConversation();
assert "foo".equals(result);
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -472,7 +472,7 @@
assert Manager.instance().isLongRunningConversation();
assert "failure".equals(result);
- result = (String) ci.endOrBeginLongRunningConversation( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -520,7 +520,7 @@
assert !Manager.instance().isLongRunningConversation();
- String result = (String) ci.checkConversationForConversationalBean( new MockInvocationContext() {
+ String result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -537,7 +537,7 @@
//assert !Manager.instance().isLongRunningConversation();
assert "error".equals(result);
- result = (String) ci.checkConversationForConversationalBean( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -556,7 +556,7 @@
//assert Manager.instance().isLongRunningConversation();
assert "begun".equals(result);
- result = (String) ci.checkConversationForConversationalBean( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -572,7 +572,7 @@
//assert Manager.instance().isLongRunningConversation();
assert "foo".equals(result);
- result = (String) ci.checkConversationForConversationalBean( new MockInvocationContext() {
+ result = (String) ci.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -629,7 +629,7 @@
final Foo foo = new Foo();
- String result = (String) vi.validateTargetComponent( new MockInvocationContext() {
+ String result = (String) vi.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -653,7 +653,7 @@
FacesMessages.instance().beforeRenderResponse();
assert !FacesContext.getCurrentInstance().getMessages().hasNext();
- result = (String) vi.validateTargetComponent( new MockInvocationContext() {
+ result = (String) vi.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -680,7 +680,7 @@
foo.setValue("not null");
- result = (String) vi.validateTargetComponent( new MockInvocationContext() {
+ result = (String) vi.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -711,7 +711,7 @@
OutcomeInterceptor oi = new OutcomeInterceptor();
- String outcome = (String) oi.interceptOutcome( new MockInvocationContext() {
+ String outcome = (String) oi.aroundInvoke( new MockInvocationContext() {
@Override
public Object proceed() throws Exception
{
@@ -720,7 +720,7 @@
} );
assert outcome==null;
- outcome = (String) oi.interceptOutcome( new MockInvocationContext() {
+ outcome = (String) oi.aroundInvoke( new MockInvocationContext() {
@Override
public Object proceed() throws Exception
{
@@ -729,7 +729,7 @@
} );
assert outcome=="success";
- Object result = oi.interceptOutcome( new MockInvocationContext() {
+ Object result = oi.aroundInvoke( new MockInvocationContext() {
@Override
public Object proceed() throws Exception
{
@@ -761,7 +761,7 @@
RemoveInterceptor ri = new RemoveInterceptor();
ri.setComponent( new Component(Foo.class, appContext) );
- ri.removeIfNecessary( new MockInvocationContext() {
+ ri.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
@@ -771,7 +771,7 @@
assert Contexts.getSessionContext().isSet("foo");
- ri.removeIfNecessary( new MockInvocationContext() {
+ ri.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
More information about the jboss-cvs-commits
mailing list