File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
aztec/src/main/kotlin/org/wordpress/aztec Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import org.xml.sax.Attributes
55import org.xml.sax.helpers.AttributesImpl
66
77class 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 {
You can’t perform that action at this time.
0 commit comments