jdk/test/sun/security/pkcs11/PKCS11Test.java
changeset 37353 e8e684b89c81
parent 36249 8b92e4bedbd4
child 40942 7a81fdff5752
--- a/jdk/test/sun/security/pkcs11/PKCS11Test.java	Wed Apr 13 16:08:43 2016 -0700
+++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java	Thu Apr 14 09:45:37 2016 +0800
@@ -181,8 +181,13 @@
 
     public static void main(PKCS11Test test, String[] args) throws Exception {
         if (args != null) {
-            if (args.length > 0 && "sm".equals(args[0])) {
-                test.enableSM = true;
+            if (args.length > 0) {
+                if ("sm".equals(args[0])) {
+                    test.enableSM = true;
+                } else {
+                    throw new RuntimeException("Unknown Command, use 'sm' as "
+                            + "first arguemtn to enable security manager");
+                }
             }
             if (test.enableSM) {
                 System.setProperty("java.security.policy",