Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ static IEnumerable<string> GetUnixConfiguredJdkPaths (Action<TraceLevel, string>
{
var config = AndroidSdkUnix.GetUnixConfigFile (logger);
foreach (var java_sdk in config.Root.Elements ("java-sdk")) {
var path = (string) java_sdk.Attribute ("path");
yield return path;
var path = (string) java_sdk.Attribute ("path");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nullable reference types are enabled, and the original code -- as well as this updated code -- is "disabling" NRT by asserting that string and not string? is returned.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted for the minimal surgical fix to solve the problem since I'm in an unfamiliar codebase. I can leave more comprehensive fix options to the maintainers. Thanks!

if (path != null) {
yield return path;
}
}
}

Expand Down