Author: slaws
Date: Tue Jun 14 10:10:46 2011
New Revision: 1135456

URL: http://svn.apache.org/viewvc?rev=1135456&view=rev
Log:
TUSCANY-3873 - Tidy so that it runs

Modified:
    
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
    
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
    
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java

Modified: 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java?rev=1135456&r1=1135455&r2=1135456&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
 Tue Jun 14 10:10:46 2011
@@ -31,13 +31,7 @@ public class HelloWorldService implement
     
     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;

Modified: 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java?rev=1135456&r1=1135455&r2=1135456&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
 Tue Jun 14 10:10:46 2011
@@ -77,7 +77,7 @@ public class TestPolicyInterceptor imple
 
     public Message invoke(Message msg) {
         System.out.println("In interceptor");
-        return msg;
+        return getNext().invoke(msg);
     }
 
     public Invoker getNext() {

Modified: 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java?rev=1135456&r1=1135455&r2=1135456&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java
 Tue Jun 14 10:10:46 2011
@@ -40,7 +40,7 @@ public class HelloworldTestCase extends 
     }
     
     public void testCalculator() throws Exception {
-        assertEquals("Hello fred myname", helloWorld.getGreetings("fred"));
+        assertEquals("Hello fred", helloWorld.getGreetings("fred"));
     }    
     
     @Override


Reply via email to