File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
main/java/com/microsoft/graph/core
test/java/com/microsoft/graph/core Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public IHttpProvider getHttpProvider() {
106106 getAuthenticationProvider (),
107107 getExecutors (),
108108 getLogger ());
109- logger .logDebug ("Created DefaultHttpProvider" );
109+ getLogger () .logDebug ("Created DefaultHttpProvider" );
110110 }
111111 return httpProvider ;
112112 }
@@ -120,7 +120,7 @@ public IHttpProvider getHttpProvider() {
120120 public ISerializer getSerializer () {
121121 if (serializer == null ) {
122122 serializer = new DefaultSerializer (getLogger ());
123- logger .logDebug ("Created DefaultSerializer" );
123+ getLogger () .logDebug ("Created DefaultSerializer" );
124124 }
125125 return serializer ;
126126 }
@@ -134,7 +134,7 @@ public ISerializer getSerializer() {
134134 public IExecutors getExecutors () {
135135 if (executors == null ) {
136136 executors = new DefaultExecutors (getLogger ());
137- logger .logDebug ("Created DefaultExecutors" );
137+ getLogger () .logDebug ("Created DefaultExecutors" );
138138 }
139139 return executors ;
140140 }
Original file line number Diff line number Diff line change 1010
1111import com .microsoft .graph .authentication .IAuthenticationProvider ;
1212import com .microsoft .graph .authentication .MockAuthenticationProvider ;
13+ import com .microsoft .graph .logger .DefaultLogger ;
14+ import com .microsoft .graph .logger .ILogger ;
1315
1416/**
1517 * Test cases for {@see DefaultClientConfig}
@@ -36,5 +38,23 @@ public void testDefaultClientConfig() {
3638 assertNotNull (mClientConfig .getAuthenticationProvider ());
3739 assertEquals (mAuthenticationProvider , mClientConfig .getAuthenticationProvider ());
3840 }
41+
42+ @ Test
43+ public void testOverrideLoggerShouldNotThrow () {
44+ final ILogger logger = new DefaultLogger ();
45+ DefaultClientConfig config = new DefaultClientConfig () {
46+
47+ @ Override
48+ public ILogger getLogger () {
49+ return logger ;
50+ }
51+
52+ };
53+ config .getExecutors ();
54+ config .getAuthenticationProvider ();
55+ config .getHttpProvider ();
56+ config .getSerializer ();
57+ config .getLogger ();
58+ }
3959
4060}
You can’t perform that action at this time.
0 commit comments