@@ -1854,16 +1854,20 @@ public JSONObject update(String key, Object newValue) throws JSONException {
18541854 final Object oldValue = this .opt (key );
18551855 this .put (key , newValue );
18561856
1857- this .propertyChangeSupportUpdate .firePropertyChange (JSONObject .propertyChangeGlobalKeyword , oldThis , this );
1858- this .propertyChangeSupportUpdate .firePropertyChange (key , oldValue , newValue );
18591857
1860- this .propertyChangeSupportNotify .firePropertyChange (key , oldValue , newValue );
1858+ new Thread (() -> {
1859+ this .propertyChangeSupportUpdate .firePropertyChange (JSONObject .propertyChangeGlobalKeyword , oldThis , this );
1860+ this .propertyChangeSupportUpdate .firePropertyChange (key , oldValue , newValue );
1861+ this .propertyChangeSupportNotify .firePropertyChange (key , oldValue , newValue );
1862+ }, "json" + key ).start ();
18611863
18621864 return this ;
18631865 }
18641866
18651867 public JSONObject notify (String key , Object oldValue , Object newValue ) throws JSONException {
1866- this .propertyChangeSupportNotify .firePropertyChange (key , oldValue , newValue );
1868+ new Thread (() -> {
1869+ this .propertyChangeSupportNotify .firePropertyChange (key , oldValue , newValue );
1870+ }, "json" + key ).start ();
18671871
18681872 return this ;
18691873 }
@@ -1948,19 +1952,21 @@ private JSONObject updateOrRemove(JSONObject jo, boolean remove, boolean trigger
19481952 }
19491953
19501954 if (oldValues .size () > 0 ) {
1951- if (triggerUpdate ) {
1952- this .propertyChangeSupportUpdate .firePropertyChange (JSONObject .propertyChangeGlobalKeyword , oldThis , this );
1953- }
1954-
1955- oldValues .forEach ((key , oldValue ) -> {
1956- final Object v2 = delValues .contains (key ) ? null : newValues .get (key );
1957- final Object v1 = oldValue == null && v2 == null ? JSONObject .NULL : oldValue ;
1958-
1955+ new Thread (() -> {
19591956 if (triggerUpdate ) {
1960- this .propertyChangeSupportUpdate .firePropertyChange (key , v1 , v2 );
1957+ this .propertyChangeSupportUpdate .firePropertyChange (JSONObject . propertyChangeGlobalKeyword , oldThis , this );
19611958 }
1962- this .propertyChangeSupportNotify .firePropertyChange (key , v1 , v2 );
1963- });
1959+
1960+ oldValues .forEach ((key , oldValue ) -> {
1961+ final Object v2 = delValues .contains (key ) ? null : newValues .get (key );
1962+ final Object v1 = oldValue == null && v2 == null ? JSONObject .NULL : oldValue ;
1963+
1964+ if (triggerUpdate ) {
1965+ this .propertyChangeSupportUpdate .firePropertyChange (key , v1 , v2 );
1966+ }
1967+ this .propertyChangeSupportNotify .firePropertyChange (key , v1 , v2 );
1968+ });
1969+ }, "json_GLOBAL" ).start ();
19641970 }
19651971
19661972 return this ;
0 commit comments