Skip to content

Commit 413ac74

Browse files
koushikthirupatturseanjmullan
authored andcommitted
8357682: sun.security.provider.certpath.Builder#getMatchingPolicies always returns null
Reviewed-by: mullan
1 parent 3bdac53 commit 413ac74

File tree

1 file changed

+2
-2
lines changed
  • src/java.base/share/classes/sun/security/provider/certpath

1 file changed

+2
-2
lines changed

src/java.base/share/classes/sun/security/provider/certpath/Builder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 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
@@ -139,7 +139,7 @@ abstract void addCertToPath(X509Certificate cert,
139139
* cert's certificate policies extension in order for a cert to be selected.
140140
*/
141141
Set<String> getMatchingPolicies() {
142-
if (matchingPolicies != null) {
142+
if (matchingPolicies == null) {
143143
Set<String> initialPolicies = buildParams.initialPolicies();
144144
if ((!initialPolicies.isEmpty()) &&
145145
(!initialPolicies.contains(PolicyChecker.ANY_POLICY)) &&

0 commit comments

Comments
 (0)