Skip to content

Commit f5464f9

Browse files
author
duke
committed
Automatic merge of jdk:master into master
2 parents 4219508 + 470ffee commit f5464f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/jdk/sun/security/pkcs11/Serialize/SerializeProvider.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -41,9 +41,9 @@
4141
public class SerializeProvider extends PKCS11Test {
4242

4343
public void main(Provider p) throws Exception {
44+
4445
if (Security.getProvider(p.getName()) != p) {
45-
System.out.println("Provider not installed in Security, skipping");
46-
return;
46+
Security.addProvider(p);
4747
}
4848

4949
ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -57,7 +57,7 @@ public void main(Provider p) throws Exception {
5757
InputStream in = new ByteArrayInputStream(data);
5858
ObjectInputStream oin = new ObjectInputStream(in);
5959

60-
Provider p2 = (Provider)oin.readObject();
60+
Provider p2 = (Provider) oin.readObject();
6161

6262
System.out.println("Reconstituted: " + p2);
6363

0 commit comments

Comments
 (0)