118 transformer.transform(xmlSource, xmlResultStream);
119 } catch (TransformerConfigurationException ex) {
120 ex.printStackTrace();
121 Assert.fail(ex.toString());
122 } catch (TransformerException ex) {
123 // expected failure
124 System.out.println("expected failure: " + ex.toString());
125 ex.printStackTrace(System.out);
126 exceptionCaught = true;
127 }
128
129 // unexpected success?
130 if (!exceptionCaught) {
131 // and the result is ...
132 xmlResult = xmlResultString.toString();
133 System.err.println("Transformation result (SECURE_PROCESSING == true) = \"" + xmlResult + "\"");
134 Assert.fail("SECURITY_PROCESSING == true, expected failure but got result: \"" + xmlResult + "\"");
135 }
136 }
137 }
138
|
118 transformer.transform(xmlSource, xmlResultStream);
119 } catch (TransformerConfigurationException ex) {
120 ex.printStackTrace();
121 Assert.fail(ex.toString());
122 } catch (TransformerException ex) {
123 // expected failure
124 System.out.println("expected failure: " + ex.toString());
125 ex.printStackTrace(System.out);
126 exceptionCaught = true;
127 }
128
129 // unexpected success?
130 if (!exceptionCaught) {
131 // and the result is ...
132 xmlResult = xmlResultString.toString();
133 System.err.println("Transformation result (SECURE_PROCESSING == true) = \"" + xmlResult + "\"");
134 Assert.fail("SECURITY_PROCESSING == true, expected failure but got result: \"" + xmlResult + "\"");
135 }
136 }
137 }
|