File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
src/main/java/com/esri/samples/portal/oauth Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -55,19 +55,20 @@ class AuthenticationDialog extends Dialog<OAuthConfiguration> {
5555 }
5656
5757 setResultConverter (dialogButton -> {
58- if (!portalURL .getText ().equals ("" ) && !clientID .getText ().equals ("" ) && !redirectURI .getText ().equals ("" )) {
59- try {
60- return dialogButton == continueButton ? new OAuthConfiguration (portalURL .getText (), clientID .getText (),
61- redirectURI .getText ()) : null ;
62- } catch (Exception e ) {
58+ if (dialogButton == continueButton ) {
59+ if (!portalURL .getText ().equals ("" ) && !clientID .getText ().equals ("" ) && !redirectURI .getText ().equals ("" )) {
60+ try {
61+ return new OAuthConfiguration (portalURL .getText (), clientID .getText (), redirectURI .getText ());
62+ } catch (Exception e ) {
63+ Alert alert = new Alert (Alert .AlertType .ERROR );
64+ alert .setContentText (e .getMessage ());
65+ alert .show ();
66+ }
67+ } else {
6368 Alert alert = new Alert (Alert .AlertType .ERROR );
64- alert .setContentText (e . getMessage () );
69+ alert .setContentText ("missing credentials" );
6570 alert .show ();
6671 }
67- } else {
68- Alert alert = new Alert (Alert .AlertType .ERROR );
69- alert .setContentText ("missing credentials" );
70- alert .show ();
7172 }
7273 return null ;
7374 });
You can’t perform that action at this time.
0 commit comments