You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by gi...@apache.org on 2015/02/01 15:57:51 UTC

svn commit: r1656311 - /santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/encryption/SignedEncryptedTest.java

Author: giger
Date: Sun Feb  1 14:57:50 2015
New Revision: 1656311

URL: http://svn.apache.org/r1656311
Log:
Sometimes it can be an advantage to read the documentation (RTFD)....

Modified:
    santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/encryption/SignedEncryptedTest.java

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/encryption/SignedEncryptedTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/encryption/SignedEncryptedTest.java?rev=1656311&r1=1656310&r2=1656311&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/encryption/SignedEncryptedTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/encryption/SignedEncryptedTest.java Sun Feb  1 14:57:50 2015
@@ -81,15 +81,14 @@ public class SignedEncryptedTest extends
     @Ignore
     @Test
     public void decryptUsingSunTransformer() throws Exception {
-
-        Class<?> tf = getClass().getClassLoader().loadClass(
-                "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
-        if (tf == null) {
+        try {
+            Class<?> tf = getClass().getClassLoader().loadClass(
+                    "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
+            secureAndVerify((TransformerFactory) tf.newInstance(), false);
+        } catch (ClassNotFoundException e) {
             System.out.println(
                     "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl not found, skipping test");
-            return;
         }
-        secureAndVerify((TransformerFactory) tf.newInstance(), false);
     }
 
     /**
@@ -99,15 +98,14 @@ public class SignedEncryptedTest extends
      */
     @Test
     public void decryptUsingXalanTransformer() throws Exception {
-
-        Class<?> tf = getClass().getClassLoader().loadClass(
-                "org.apache.xalan.processor.TransformerFactoryImpl");
-        if (tf == null) {
+        try {
+            Class<?> tf = getClass().getClassLoader().loadClass(
+                    "org.apache.xalan.processor.TransformerFactoryImpl");
+            secureAndVerify((TransformerFactory) tf.newInstance(), false);
+        } catch (ClassNotFoundException e) {
             System.out.println(
                     "org.apache.xalan.processor.TransformerFactoryImpl not found, skipping test");
-            return;
         }
-        secureAndVerify((TransformerFactory) tf.newInstance(), false);
     }
 
     /**