diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-14 10:10:46 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-14 10:10:46 +0000 |
commit | 2612daddaf7657757ad960b440100241329df34d (patch) | |
tree | 1e7b07ec256848b1ac7e30b1e6b449ebc93812f7 /sca-java-2.x/trunk/testing/itest | |
parent | de386cde2579cc284230a70093d1b6a28d00f5a2 (diff) |
TUSCANY-3873 - Tidy so that it runs
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1135456 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest')
3 files changed, 3 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java index c72d41c851..8c3284eb84 100644 --- a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java +++ b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java @@ -31,13 +31,7 @@ public class HelloWorldService implements HelloWorld { public String getGreetings(String name) {
Subject subject = requestContext.getSecuritySubject();
- String response = "Hello " + name + " ";
-
- if (subject == null){
- response += "null subject";
- } else {
- response += subject.getPrincipals().iterator().next().getName();
- }
+ String response = "Hello " + name;
System.out.println("At service: " + response);
return response;
diff --git a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java index be0c0a9eb6..ea6b31c5cb 100644 --- a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java +++ b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java @@ -77,7 +77,7 @@ public class TestPolicyInterceptor implements PhasedInterceptor { public Message invoke(Message msg) {
System.out.println("In interceptor");
- return msg;
+ return getNext().invoke(msg);
}
public Invoker getNext() {
diff --git a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java index c2b2e7efba..208ffd0703 100644 --- a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java +++ b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java @@ -40,7 +40,7 @@ public class HelloworldTestCase extends TestCase { }
public void testCalculator() throws Exception {
- assertEquals("Hello fred myname", helloWorld.getGreetings("fred"));
+ assertEquals("Hello fred", helloWorld.getGreetings("fred"));
}
@Override
|