deleting of an not existing Preferences Key should not throw an exception. see JUnit test

This commit is contained in:
smallsql 2009-11-28 18:51:49 +00:00
Родитель 79deb06311
Коммит b49e2890ef
1 изменённых файлов: 20 добавлений и 16 удалений

Просмотреть файл

@ -4572,22 +4572,26 @@ namespace IKVM.NativeCode.java
}
}
public static int WindowsRegDeleteValue(int hKey, byte[] valueName)
{
try
{
MapKey(hKey).DeleteValue(BytesToString(valueName));
return 0;
}
catch (System.Security.SecurityException)
{
return 5;
}
catch (UnauthorizedAccessException)
{
return 5;
}
}
public static int WindowsRegDeleteValue(int hKey, byte[] valueName)
{
try
{
MapKey(hKey).DeleteValue(BytesToString(valueName));
return 0;
}
catch (System.ArgumentException)
{
return 2; //ERROR_FILE_NOT_FOUND
}
catch (System.Security.SecurityException)
{
return 5; //ERROR_ACCESS_DENIED
}
catch (UnauthorizedAccessException)
{
return 5; //ERROR_ACCESS_DENIED
}
}
public static int[] WindowsRegQueryInfoKey(int hKey)
{