Skip to content

Commit a16b479

Browse files
Copilotrolfbjarne
andcommitted
Address code review feedback
Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
1 parent d88ee8e commit a16b479

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

msbuild/Xamarin.MacDev.Tasks/Tasks/ComputeInstructionSet.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ public override bool Execute ()
235235

236236
var instructionSet = ComputeMinimumInstructionSet (Platform, SupportedOSPlatformVersion);
237237
if (!string.IsNullOrEmpty (instructionSet)) {
238+
// The null-forgiving operator is required here because the compiler doesn't understand
239+
// that !string.IsNullOrEmpty guarantees non-null
238240
InstructionSet = instructionSet!;
239241
Log.LogMessage (MessageImportance.Low, $"Computed instruction set '{InstructionSet}' for {PlatformName} {SupportedOSPlatformVersion}");
240242
} else {

tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ComputeInstructionSetTaskTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ public void TestVeryOldOSVersion ()
9393
var task = CreateTask (ApplePlatform.iOS);
9494
task.SupportedOSPlatformVersion = "9.0";
9595

96-
ExecuteTask (task);
97-
9896
// iOS 9 was supported by iPhone 4s (A5), but we don't have data for that era
9997
// The task should handle this gracefully
10098
ExecuteTask (task);

0 commit comments

Comments
 (0)