Skip to content

Commit f4ba7b2

Browse files
author
Andrey Turbanov
committedJul 21, 2023
8312414: Make java.util.ServiceLoader.LANG_ACCESS final
Reviewed-by: alanb, jpai
1 parent d55d7e8 commit f4ba7b2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎src/java.base/share/classes/java/util/ServiceLoader.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2023, 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
@@ -422,10 +422,7 @@ public final class ServiceLoader<S>
422422
// Incremented when reload is called
423423
private int reloadCount;
424424

425-
private static JavaLangAccess LANG_ACCESS;
426-
static {
427-
LANG_ACCESS = SharedSecrets.getJavaLangAccess();
428-
}
425+
private static final JavaLangAccess LANG_ACCESS = SharedSecrets.getJavaLangAccess();
429426

430427
/**
431428
* Represents a service provider located by {@code ServiceLoader}.

0 commit comments

Comments
 (0)
Please sign in to comment.