changeset 8541:e0cfd0b99260

8050893: (smartcardio) Invert reset argument in tests in sun/security/smartcardio Reviewed-by: valeriep
author igerasim
date Fri, 18 Jul 2014 17:42:27 +0400
parents 9d6060f04935
children 446122f55fef
files test/sun/security/smartcardio/TestAll.java test/sun/security/smartcardio/TestChannel.java test/sun/security/smartcardio/TestConnect.java test/sun/security/smartcardio/TestConnectAgain.java test/sun/security/smartcardio/TestControl.java test/sun/security/smartcardio/TestDefault.java test/sun/security/smartcardio/TestExclusive.java test/sun/security/smartcardio/TestMultiplePresent.java test/sun/security/smartcardio/TestPresent.java test/sun/security/smartcardio/TestTransmit.java test/sun/security/smartcardio/Utils.java
diffstat 11 files changed, 61 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/smartcardio/TestAll.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestAll.java	Fri Jul 18 17:42:27 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -26,7 +26,7 @@
 // Because all the tests are marked @ignore as they require special hardware,
 // we cannot use jtreg to do this.
 
-import java.lang.reflect.*;
+import java.lang.reflect.Method;
 
 public class TestAll {
 
--- a/test/sun/security/smartcardio/TestChannel.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestChannel.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,10 @@
  * @run main/manual TestExclusive
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CommandAPDU;
 
 public class TestChannel extends Utils {
 
@@ -94,7 +94,7 @@
         }
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/test/sun/security/smartcardio/TestConnect.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestConnect.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,11 @@
  * @run main/manual TestConnect
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.util.List;
+import javax.smartcardio.TerminalFactory;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardTerminal;
 
 public class TestConnect extends Utils {
 
@@ -62,7 +63,7 @@
             throw new Exception("Not T=0 protocol");
         }
         transmit(card);
-        card.disconnect(false);
+        card.disconnect(true);
 
         try {
             transmit(card);
@@ -95,7 +96,7 @@
             throw new Exception("Not T=0 protocol");
         }
         transmit(card);
-        card.disconnect(true);
+        card.disconnect(false);
 
         card = terminal.connect("*");
         System.out.println("card: " + card);
@@ -104,7 +105,6 @@
         }
         transmit(card);
         card.disconnect(true);
-        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/test/sun/security/smartcardio/TestConnectAgain.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestConnectAgain.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,10 @@
  * @run main/manual TestTransmit
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardException;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardTerminal;
 
 public class TestConnectAgain extends Utils {
 
@@ -94,7 +94,7 @@
         }
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/test/sun/security/smartcardio/TestControl.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestControl.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,9 @@
  * @run main/manual TestControl
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardException;
+import javax.smartcardio.CardTerminal;
 
 public class TestControl extends Utils {
 
@@ -67,7 +66,7 @@
         }
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/test/sun/security/smartcardio/TestDefault.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestDefault.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,9 @@
  * @run main/manual TestDefault
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.util.List;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.TerminalFactory;
 
 public class TestDefault {
 
--- a/test/sun/security/smartcardio/TestExclusive.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestExclusive.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,11 @@
  * @run main/manual TestExclusive
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardException;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CommandAPDU;
 
 public class TestExclusive extends Utils {
 
@@ -83,9 +84,9 @@
         Thread.sleep(1000);
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
-        if (otherOK == false) {
+        if (! otherOK) {
             throw new Exception("Secondary thread failed");
         }
 
--- a/test/sun/security/smartcardio/TestMultiplePresent.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestMultiplePresent.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,10 @@
  * @run main/manual TestPresent
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.util.List;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CardTerminals;
+import javax.smartcardio.TerminalFactory;
 import static javax.smartcardio.CardTerminals.State.*;
 
 public class TestMultiplePresent {
--- a/test/sun/security/smartcardio/TestPresent.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestPresent.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,9 @@
  * @run main/manual TestPresent
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.util.List;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.TerminalFactory;
 
 public class TestPresent {
 
--- a/test/sun/security/smartcardio/TestTransmit.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/TestTransmit.java	Fri Jul 18 17:42:27 2014 +0400
@@ -30,10 +30,16 @@
  * @run main/manual TestTransmit
  */
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.StringReader;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CommandAPDU;
+import javax.smartcardio.ResponseAPDU;
 
 public class TestTransmit extends Utils {
 
@@ -78,7 +84,7 @@
         }
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/test/sun/security/smartcardio/Utils.java	Wed Jan 18 02:02:14 2017 +0000
+++ b/test/sun/security/smartcardio/Utils.java	Fri Jul 18 17:42:27 2014 +0400
@@ -24,10 +24,16 @@
 
 // common utility functions for the PC/SC tests
 
-import javax.smartcardio.*;
-
-import java.io.*;
-import java.util.*;
+import java.io.StringReader;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.ResponseAPDU;
+import javax.smartcardio.CommandAPDU;
+import javax.smartcardio.TerminalFactory;
 
 public class Utils {