Skip to content

Commit 0a71df7

Browse files
committed
Polishing
1 parent 82b7fcb commit 0a71df7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -178,13 +178,13 @@ public Object getSingleton(String beanName) {
178178
*/
179179
@Nullable
180180
protected Object getSingleton(String beanName, boolean allowEarlyReference) {
181-
// Quick check for existing instance without full singleton lock
181+
// Quick check for existing instance without full singleton lock.
182182
Object singletonObject = this.singletonObjects.get(beanName);
183183
if (singletonObject == null && isSingletonCurrentlyInCreation(beanName)) {
184184
singletonObject = this.earlySingletonObjects.get(beanName);
185185
if (singletonObject == null && allowEarlyReference) {
186186
synchronized (this.singletonObjects) {
187-
// Consistent creation of early reference within full singleton lock
187+
// Consistent creation of early reference within full singleton lock.
188188
singletonObject = this.singletonObjects.get(beanName);
189189
if (singletonObject == null) {
190190
singletonObject = this.earlySingletonObjects.get(beanName);

Diff for: spring-core/src/main/java/org/springframework/core/SpringProperties.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -117,7 +117,7 @@ public static String getProperty(String key) {
117117
* @param key the property key
118118
*/
119119
public static void setFlag(String key) {
120-
localProperties.put(key, Boolean.TRUE.toString());
120+
localProperties.setProperty(key, Boolean.TRUE.toString());
121121
}
122122

123123
/**

0 commit comments

Comments
 (0)