Skip to content

Commit 4fd9ae0

Browse files
[Tools.AndroidSdk] Remove unused key_name variables (#345)
Delete two dead-code string.Format assignments that were never read: - OS.CheckRegistryKeyForExecutable (OS.cs) - OracleJdkLocations.GetOracleJdkPaths (OracleJdkLocations.cs) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3bfeba6 commit 4fd9ae0

2 files changed

Lines changed: 0 additions & 3 deletions

File tree

src/Xamarin.Android.Tools.AndroidSdk/Jdks/OracleJdkLocations.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ static IEnumerable<string> GetOracleJdkPaths ()
2828
string subkey = @"SOFTWARE\JavaSoft\Java Development Kit";
2929

3030
foreach (var wow64 in new[] { RegistryEx.Wow64.Key32, RegistryEx.Wow64.Key64 }) {
31-
string key_name = string.Format (@"{0}\{1}\{2}", "HKLM", subkey, "CurrentVersion");
3231
var currentVersion = RegistryEx.GetValueString (RegistryEx.LocalMachine, subkey, "CurrentVersion", wow64);
3332

3433
if (!string.IsNullOrEmpty (currentVersion)) {

src/Xamarin.Android.Tools.AndroidSdk/OS.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ IntPtr lpftLastWriteTime
179179
internal static bool CheckRegistryKeyForExecutable (UIntPtr key, string subkey, string valueName, RegistryEx.Wow64 wow64, string subdir, string exe)
180180
{
181181
try {
182-
string key_name = string.Format (@"{0}\{1}\{2}", key == RegistryEx.CurrentUser ? "HKCU" : "HKLM", subkey, valueName);
183-
184182
var path = AndroidSdkBase.NullIfEmpty (RegistryEx.GetValueString (key, subkey, valueName, wow64));
185183

186184
if (path == null) {

0 commit comments

Comments
 (0)