possible for subkeys/values not to exist
This commit is contained in:
parent
29d57da8a9
commit
9b4dd7b263
|
@ -65,11 +65,14 @@ public class TestRegistryKey extends SigarTestCase {
|
|||
} catch (Exception e) { /*not installed - ok*/ }
|
||||
if (msmq != null) {
|
||||
traceln("MSMQ...");
|
||||
assertTrue(msmq.getSubKeyNames().length > 0);
|
||||
if (msmq.getSubKeyNames().length > 0) {
|
||||
try {
|
||||
String build = msmq.getStringValue("CurrentBuild");
|
||||
assertLengthTrace("CurrentBuild", build);
|
||||
int id = msmq.getIntValue("SeqID");
|
||||
assertGtZeroTrace("SeqID", id);
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
msmq.close();
|
||||
}
|
||||
|
||||
|
@ -79,8 +82,10 @@ public class TestRegistryKey extends SigarTestCase {
|
|||
} catch (Exception e) { /*not installed - ok*/ }
|
||||
if (sql != null) {
|
||||
traceln("MsSQL...");
|
||||
try {
|
||||
String edition = sql.getStringValue("Edition");
|
||||
assertLengthTrace("Edition", edition);
|
||||
} catch (Exception e) {}
|
||||
sql.close();
|
||||
}
|
||||
ms.close();
|
||||
|
|
Loading…
Reference in New Issue