jdk/test/sun/security/smartcardio/TestExclusive.java
changeset 35778 e2a3c03097de
parent 25656 676435b3c625
child 41106 f37e9bfeae01
--- a/jdk/test/sun/security/smartcardio/TestExclusive.java	Thu Feb 11 11:19:03 2016 -0500
+++ b/jdk/test/sun/security/smartcardio/TestExclusive.java	Fri Feb 12 00:20:16 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,11 @@
 
     public static void main(String[] args) throws Exception {
         CardTerminal terminal = getTerminal(args);
+        if (terminal == null) {
+            System.out.println("Skipping the test: " +
+                    "no card terminals available");
+            return;
+        }
 
         // establish a connection with the card
         Card card = terminal.connect("T=0");