mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
NetworkTable.containsKey(): Always return false on empty key.
This commit is contained in:
@@ -156,7 +156,7 @@ public final class NetworkTable {
|
||||
* @return true if the table as a value assigned to the given key
|
||||
*/
|
||||
public boolean containsKey(String key) {
|
||||
return getEntry(key).exists();
|
||||
return !("".equals(key)) && getEntry(key).exists();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -286,7 +286,7 @@ std::shared_ptr<NetworkTable> NetworkTable::GetSubTable(StringRef key) const {
|
||||
}
|
||||
|
||||
bool NetworkTable::ContainsKey(StringRef key) const {
|
||||
return GetEntry(key).Exists();
|
||||
return !key.empty() && GetEntry(key).Exists();
|
||||
}
|
||||
|
||||
bool NetworkTable::ContainsSubTable(StringRef key) const {
|
||||
|
||||
Reference in New Issue
Block a user