diff --git a/wpiutil/src/main/java/edu/wpi/first/util/datalog/StructArrayLogEntry.java b/wpiutil/src/main/java/edu/wpi/first/util/datalog/StructArrayLogEntry.java index b3a31c9a52..e208f2c0d0 100644 --- a/wpiutil/src/main/java/edu/wpi/first/util/datalog/StructArrayLogEntry.java +++ b/wpiutil/src/main/java/edu/wpi/first/util/datalog/StructArrayLogEntry.java @@ -87,7 +87,7 @@ public final class StructArrayLogEntry extends DataLogEntry { * @param nelem number of elements */ public void reserve(int nelem) { - synchronized (m_buf) { + synchronized (this) { m_buf.reserve(nelem); } } @@ -121,7 +121,7 @@ public final class StructArrayLogEntry extends DataLogEntry { * @param timestamp Time stamp (0 to indicate now) */ public void append(Collection value, long timestamp) { - synchronized (m_buf) { + synchronized (this) { ByteBuffer bb = m_buf.writeArray(value); m_log.appendRaw(m_entry, bb, 0, bb.position(), timestamp); }