summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-06-14 10:10:46 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-06-14 10:10:46 +0000
commit2612daddaf7657757ad960b440100241329df34d (patch)
tree1e7b07ec256848b1ac7e30b1e6b449ebc93812f7
parentde386cde2579cc284230a70093d1b6a28d00f5a2 (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
-rw-r--r--sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java8
-rw-r--r--sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java2
-rw-r--r--sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java2
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