jdk/test/java/security/Security/removing/RemoveProviders.java
changeset 10057 03ae05289550
parent 5506 202f599c92aa
--- a/jdk/test/java/security/Security/removing/RemoveProviders.java	Mon Jun 20 12:27:20 2011 +0100
+++ b/jdk/test/java/security/Security/removing/RemoveProviders.java	Mon Jun 20 19:17:47 2011 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -23,7 +23,8 @@
 
 /**
  * @test
- * @bug 4963416
+ * @bug 4963416 7054918
+ * @library ../../testlibrary
  * @summary make sure removeProvider() always works correctly
  * @author Andreas Sterbenz
  */
@@ -35,6 +36,15 @@
 public class RemoveProviders {
 
     public static void main(String[] args) throws Exception {
+        ProvidersSnapshot snapshot = ProvidersSnapshot.create();
+        try {
+            main0(args);
+        } finally {
+            snapshot.restore();
+        }
+    }
+
+    public static void main0(String[] args) throws Exception {
         Provider[] providers = Security.getProviders();
         System.out.println("Providers: " + Arrays.asList(providers));