diff --git a/bindings/java/src/org/sleuthkit/datamodel/OsAccount.java b/bindings/java/src/org/sleuthkit/datamodel/OsAccount.java index a2c77045c3402d7f5917fa5247c9c84819fceff3..4652057d528c2ac5f6a301765e8245c3a9752754 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/OsAccount.java +++ b/bindings/java/src/org/sleuthkit/datamodel/OsAccount.java @@ -20,10 +20,8 @@ import java.util.Collections; import java.util.List; -import java.util.Objects; import java.util.Optional; import java.util.ResourceBundle; -import org.apache.commons.lang3.StringUtils; /** * Abstracts an OS user account. OS Accounts have a scope, which is defined by @@ -246,7 +244,7 @@ public static OsAccountType fromID(int typeId) { * * @param osAccountAttribute The osAccount Attribute that is to be added. */ - void setAttributesInternal(List<OsAccountAttribute> osAccountAttributes) { + synchronized void setAttributesInternal(List<OsAccountAttribute> osAccountAttributes) { this.osAccountAttributes = osAccountAttributes; } @@ -350,7 +348,7 @@ public OsAccountDbStatus getOsAccountDbStatus() { * * @throws TskCoreException */ - public List<OsAccountAttribute> getExtendedOsAccountAttributes() throws TskCoreException { + public synchronized List<OsAccountAttribute> getExtendedOsAccountAttributes() throws TskCoreException { if (osAccountAttributes == null) { osAccountAttributes = sleuthkitCase.getOsAccountManager().getOsAccountAttributes(this); } @@ -364,7 +362,7 @@ public List<OsAccountAttribute> getExtendedOsAccountAttributes() throws TskCoreE * * @throws TskCoreException */ - public List<OsAccountInstance> getOsAccountInstances() throws TskCoreException { + public synchronized List<OsAccountInstance> getOsAccountInstances() throws TskCoreException { if (osAccountInstances == null) { osAccountInstances = sleuthkitCase.getOsAccountManager().getOsAccountInstances(this); }