Skip to content

Commit a11b69b

Browse files
committed
Mark all methods as Synchronized.
1 parent fc32c7f commit a11b69b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/AztecAttributes.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import org.xml.sax.Attributes
55
import org.xml.sax.helpers.AttributesImpl
66

77
class AztecAttributes(attributes: Attributes = AttributesImpl()) : AttributesImpl(attributes) {
8+
@Synchronized
89
fun setValue(key: String, value: String) {
910
val index = getIndex(key)
1011

@@ -22,6 +23,7 @@ class AztecAttributes(attributes: Attributes = AttributesImpl()) : AttributesImp
2223
}
2324
}
2425

26+
@Synchronized
2527
private fun logInternalState() {
2628
AppLog.e(AppLog.T.EDITOR, "Dumping internal state:")
2729
AppLog.e(AppLog.T.EDITOR, "length = $length")
@@ -34,10 +36,12 @@ class AztecAttributes(attributes: Attributes = AttributesImpl()) : AttributesImp
3436
}
3537
}
3638

39+
@Synchronized
3740
fun isEmpty(): Boolean {
3841
return length == 0
3942
}
4043

44+
@Synchronized
4145
fun removeAttribute(key: String) {
4246
if (hasAttribute(key)) {
4347
val index = getIndex(key)
@@ -53,10 +57,12 @@ class AztecAttributes(attributes: Attributes = AttributesImpl()) : AttributesImp
5357
}
5458
}
5559

60+
@Synchronized
5661
fun hasAttribute(key: String): Boolean {
5762
return getValue(key) != null
5863
}
5964

65+
@Synchronized
6066
override fun toString(): String {
6167
val sb = StringBuilder()
6268
try {

0 commit comments

Comments
 (0)