We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b23b0c4 commit 06cee5cCopy full SHA for 06cee5c
logcat/src/main/java/com/android/logcat/http/HttpServiceProvider.java
@@ -3,13 +3,11 @@
3
public class HttpServiceProvider {
4
private HttpServiceProvider() {} // 인스턴스 생성 X
5
6
- private static HttpService provider;
+ private static class Singleton {
7
+ private static final HttpService provider = new HttpService();
8
+ }
9
10
public static HttpService getInstance() {
- if (provider == null) {
- provider = new HttpService();
11
- }
12
-
13
- return provider;
+ return Singleton.provider;
14
}
15
0 commit comments