Skip to content

Commit 3d0df51

Browse files
committed
Clear ServicesMap fields in the declared order
Constructors assign the fields in the same order.
1 parent 35e2eae commit 3d0df51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/java.base/share/classes/java/security/Provider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,11 +834,11 @@ Service getService(ServiceKey key) {
834834
* changes with the Properties map.
835835
*/
836836
void clear() {
837+
serviceSet.set(null);
837838
services.clear();
838839
legacySvcKeys.clear();
839840
serviceProps.clear();
840841
serviceAttrProps.clear();
841-
serviceSet.set(null);
842842
}
843843

844844
/*

0 commit comments

Comments
 (0)