ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wer...@apache.org
Subject svn commit: r359529 - /webservices/commons/trunk/policy/src/examples/SimplePolicyExample.java
Date Wed, 28 Dec 2005 14:02:00 GMT
Author: werner
Date: Wed Dec 28 06:01:56 2005
New Revision: 359529

URL: http://svn.apache.org/viewcvs?rev=359529&view=rev
Log:
Insert test for second policy file and check for normalized.

Modified:
    webservices/commons/trunk/policy/src/examples/SimplePolicyExample.java

Modified: webservices/commons/trunk/policy/src/examples/SimplePolicyExample.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/policy/src/examples/SimplePolicyExample.java?rev=359529&r1=359528&r2=359529&view=diff
==============================================================================
--- webservices/commons/trunk/policy/src/examples/SimplePolicyExample.java (original)
+++ webservices/commons/trunk/policy/src/examples/SimplePolicyExample.java Wed Dec 28 06:01:56
2005
@@ -37,6 +37,7 @@
             fis = new FileInputStream(args[0]);
         } else {
             fis = new FileInputStream("policy/src/examples/policy2.xml");
+//            fis = new FileInputStream("policy/src/examples/SecurityPolicyMsg.xml");
         }
 
         PolicyReader prdr = PolicyFactory
@@ -46,6 +47,9 @@
 
         Policy argOne = prdr.readPolicy(fis);
         Policy norm = (Policy) argOne.normalize();
+        if (!norm.isNormalized()) {
+            throw new RuntimeException("norm is not in normalized format");
+        }
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         pwrt.writePolicy(norm, baos);



Mime
View raw message