File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 2020using OpenQA . Selenium . Internal ;
2121using System ;
2222using System . Collections . Generic ;
23+ using System . Diagnostics . CodeAnalysis ;
2324using System . Globalization ;
2425using System . Text . Json ;
2526using System . Text . Json . Serialization ;
@@ -216,13 +217,16 @@ public string ToJson()
216217 }
217218
218219 /// <summary>
219- /// Gets the <see cref="Value"/> of this response, or throws if it is <see langword="null"/>.
220+ /// Throws if <see cref="Value"/> is <see langword="null"/>.
220221 /// </summary>
221- /// <returns>The <see cref="Value"/> instance.</returns>
222222 /// <exception cref="WebDriverException">If <see cref="Value"/> is <see langword="null"/>.</exception>
223- internal object GetNotNullValue ( )
223+ [ MemberNotNull ( nameof ( Value ) ) ]
224+ internal void ThrowIfValueNull ( )
224225 {
225- return Value ?? throw new WebDriverException ( "Expected not-null response" ) ;
226+ if ( Value is null )
227+ {
228+ throw new WebDriverException ( "Expected not-null response" ) ;
229+ }
226230 }
227231
228232 /// <summary>
You can’t perform that action at this time.
0 commit comments