@@ -276,39 +276,38 @@ private void uiTextComponents2Json() {
276276 }
277277
278278 private void json2UIComponents (String json ) {
279- intermediateState = true ;
280279 try {
281- if (StringUtils .isNotBlank (json )) {
282- try {
283- Map <String , String > map = JsonUtils .fromJson (json , HashMap .class );
284- if (map != null ) {
285- ApplicationManager .getApplication ().invokeAndWait (() -> {
286- if (map .containsKey ("appId" )) {
287- this .clientIdTextField .setText (StringUtils .defaultString (map .get ("appId" )));
288- }
289-
290- if (map .containsKey ("tenant" )) {
291- this .tenantIdTextField .setText (StringUtils .defaultString (map .get ("tenant" )));
292- }
293-
294- if (map .containsKey ("password" ) && !isPlaceHolder (map .get ("password" ))) {
295- this .passwordRadioButton .setSelected (true );
296- this .keyPasswordField .setText (StringUtils .defaultString (map .get ("password" )));
297- }
298-
299- if (map .containsKey ("fileWithCertAndPrivateKey" )) {
300- this .certificateRadioButton .setSelected (true );
301- this .certFileTextField .setText (StringUtils .defaultString (map .get ("fileWithCertAndPrivateKey" )));
302- }
303- });
280+ Map <String , String > map = JsonUtils .fromJson (json , HashMap .class );
281+ if (map != null ) {
282+ ApplicationManager .getApplication ().invokeLater (() -> {
283+ intermediateState = true ;
284+ try {
285+ if (map .containsKey ("appId" )) {
286+ this .clientIdTextField .setText (StringUtils .defaultString (map .get ("appId" )));
287+ }
288+
289+ if (map .containsKey ("tenant" )) {
290+ this .tenantIdTextField .setText (StringUtils .defaultString (map .get ("tenant" )));
291+ }
292+
293+ if (map .containsKey ("password" ) && !isPlaceHolder (map .get ("password" ))) {
294+ this .passwordRadioButton .setSelected (true );
295+ this .keyPasswordField .setText (StringUtils .defaultString (map .get ("password" )));
296+ }
297+
298+ if (map .containsKey ("fileWithCertAndPrivateKey" )) {
299+ this .certificateRadioButton .setSelected (true );
300+ this .certFileTextField .setText (StringUtils .defaultString (map .get ("fileWithCertAndPrivateKey" )));
301+ }
302+ } finally {
303+ intermediateState = false ;
304304 }
305305
306- } catch (JsonSyntaxException ex ) {
307- // ignore all json errors
308- }
306+ });
309307 }
310- } finally {
311- intermediateState = false ;
308+
309+ } catch (JsonSyntaxException ex ) {
310+ // ignore all json errors
312311 }
313312 }
314313
0 commit comments