mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-0: Fix tests. Also fixed some ignored stack traces.
This commit is contained in:
parent
1a36ad806e
commit
a66412f026
2 changed files with 7 additions and 3 deletions
|
@ -198,7 +198,7 @@ public class DefaultTargetObject<E extends TargetObject, P extends TargetObject>
|
|||
@Override
|
||||
public Map<String, E> getCachedElements() {
|
||||
synchronized (model.lock) {
|
||||
return Map.copyOf(elements);
|
||||
return elements == null ? Map.of() : Map.copyOf(elements);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ public class DefaultTargetObject<E extends TargetObject, P extends TargetObject>
|
|||
@Override
|
||||
public Map<String, ?> getCachedAttributes() {
|
||||
synchronized (model.lock) {
|
||||
return Map.copyOf(attributes);
|
||||
return attributes == null ? Map.of() : Map.copyOf(attributes);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,8 @@ public class DefaultTargetObject<E extends TargetObject, P extends TargetObject>
|
|||
@Override
|
||||
public Object getCachedAttribute(String name) {
|
||||
synchronized (model.lock) {
|
||||
return attributes.get(name);
|
||||
// Could get called during object's constructor
|
||||
return attributes == null ? null : attributes.get(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue