@@ -1854,20 +1854,16 @@ public JSONObject update(String key, Object newValue) throws JSONException {
1854
1854
final Object oldValue = this .opt (key );
1855
1855
this .put (key , newValue );
1856
1856
1857
+ this .propertyChangeSupportUpdate .firePropertyChange (JSONObject .propertyChangeGlobalKeyword , oldThis , this );
1858
+ this .propertyChangeSupportUpdate .firePropertyChange (key , oldValue , newValue );
1857
1859
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 ();
1860
+ this .propertyChangeSupportNotify .firePropertyChange (key , oldValue , newValue );
1863
1861
1864
1862
return this ;
1865
1863
}
1866
1864
1867
1865
public JSONObject notify (String key , Object oldValue , Object newValue ) throws JSONException {
1868
- new Thread (() -> {
1869
- this .propertyChangeSupportNotify .firePropertyChange (key , oldValue , newValue );
1870
- }, "json" + key ).start ();
1866
+ this .propertyChangeSupportNotify .firePropertyChange (key , oldValue , newValue );
1871
1867
1872
1868
return this ;
1873
1869
}
@@ -1952,21 +1948,19 @@ private JSONObject updateOrRemove(JSONObject jo, boolean remove, boolean trigger
1952
1948
}
1953
1949
1954
1950
if (oldValues .size () > 0 ) {
1955
- new Thread (() -> {
1956
- if (triggerUpdate ) {
1957
- this .propertyChangeSupportUpdate .firePropertyChange (JSONObject .propertyChangeGlobalKeyword , oldThis , this );
1958
- }
1951
+ if (triggerUpdate ) {
1952
+ this .propertyChangeSupportUpdate .firePropertyChange (JSONObject .propertyChangeGlobalKeyword , oldThis , this );
1953
+ }
1959
1954
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 ;
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 ;
1963
1958
1964
- if (triggerUpdate ) {
1965
- this .propertyChangeSupportUpdate .firePropertyChange (key , v1 , v2 );
1966
- }
1967
- this .propertyChangeSupportNotify .firePropertyChange (key , v1 , v2 );
1968
- });
1969
- }, "json_GLOBAL" ).start ();
1959
+ if (triggerUpdate ) {
1960
+ this .propertyChangeSupportUpdate .firePropertyChange (key , v1 , v2 );
1961
+ }
1962
+ this .propertyChangeSupportNotify .firePropertyChange (key , v1 , v2 );
1963
+ });
1970
1964
}
1971
1965
1972
1966
return this ;
0 commit comments