Skip to content
Snippets Groups Projects
Commit fbec6ff6 authored by Jayaram Sreevalsan's avatar Jayaram Sreevalsan
Browse files

Adding synchronized access to osAccountAttributes

parent 0a272c00
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,7 @@ public final class OsAccount extends AbstractContent { ...@@ -60,7 +60,7 @@ public final class OsAccount extends AbstractContent {
private Long creationTime = null; private Long creationTime = null;
private List<OsAccountAttribute> osAccountAttributes = null; private List<OsAccountAttribute> osAccountAttributes = null;
private volatile List<OsAccountInstance> osAccountInstances = null; private List<OsAccountInstance> osAccountInstances = null;
private boolean isDirty = false; // indicates that some member value has changed since construction and it should be updated in the database. private boolean isDirty = false; // indicates that some member value has changed since construction and it should be updated in the database.
...@@ -481,7 +481,7 @@ public OsAccountDbStatus getOsAccountDbStatus() { ...@@ -481,7 +481,7 @@ public OsAccountDbStatus getOsAccountDbStatus() {
* *
* @throws TskCoreException * @throws TskCoreException
*/ */
public List<OsAccountAttribute> getOsAccountAttributes() throws TskCoreException { public synchronized List<OsAccountAttribute> getOsAccountAttributes() throws TskCoreException {
if (osAccountAttributes == null) { if (osAccountAttributes == null) {
osAccountAttributes = sleuthkitCase.getOsAccountManager().getOsAccountAttributes(this); osAccountAttributes = sleuthkitCase.getOsAccountManager().getOsAccountAttributes(this);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment