Skip to content

Commit

Permalink
sonar :: add synchronized to clear() and isInUse() methods in HDMobil…
Browse files Browse the repository at this point in the history
…eAgent to match parent class implementation (#426)
  • Loading branch information
dev-mlb committed Apr 21, 2023
1 parent 80cee42 commit 9cb7a95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/emissary/core/HDMobileAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public synchronized int payloadCount() {
* Clear the payloadList and all other state info
*/
@Override
protected void clear() {
protected synchronized void clear() {
super.clear();
this.payloadList.clear();
}
Expand Down Expand Up @@ -516,7 +516,7 @@ public Object getPayloadForTransport() {
* Report whether we are busy or not
*/
@Override
public boolean isInUse() {
public synchronized boolean isInUse() {
return (this.payloadList != null) && !this.payloadList.isEmpty() && (arrivalPlace != null);
}

Expand Down

0 comments on commit 9cb7a95

Please sign in to comment.