File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
adoptopenjdk/icedteaweb/resources/downloader Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 1212import net .adoptopenjdk .icedteaweb .resources .Resource ;
1313import net .adoptopenjdk .icedteaweb .resources .cache .Cache ;
1414import net .adoptopenjdk .icedteaweb .resources .cache .DownloadInfo ;
15+ import net .adoptopenjdk .icedteaweb .ui .swing .SwingUtils ;
1516import net .sourceforge .jnlp .config .ConfigurationConstants ;
1617import net .sourceforge .jnlp .runtime .JNLPRuntime ;
1718import net .sourceforge .jnlp .util .UrlUtils ;
1819
1920import java .io .ByteArrayInputStream ;
2021import java .io .File ;
22+ import java .io .FileNotFoundException ;
2123import java .io .IOException ;
2224import java .io .InputStream ;
2325import java .net .Socket ;
@@ -104,9 +106,12 @@ private String exceptionMessage(final Exception e) {
104106 private void checkForProxyError () {
105107 for (final Exception excp : downLoadExceptions ) {
106108 final Throwable cause = excp .getCause ();
107- if (cause instanceof IOException && cause .getMessage ().toLowerCase ().contains ("proxy" )) {
108- BasicExceptionDialog .show ((IOException ) cause );
109- JNLPRuntime .exit (-1 );
109+ if (cause instanceof IOException && !(cause instanceof FileNotFoundException ) && cause .getMessage ().toLowerCase ().contains ("proxy" )) {
110+ BasicExceptionDialog .willBeShown ();
111+ SwingUtils .invokeLater (() -> {
112+ BasicExceptionDialog .show ((IOException ) cause );
113+ JNLPRuntime .exit (-1 , false );
114+ });
110115 }
111116 }
112117 }
Original file line number Diff line number Diff line change @@ -894,12 +894,19 @@ private static boolean isPluginDebug() {
894894 return pluginDebug ;
895895 }
896896
897- public static <T > T exit (int i ) {
898- waitForExceptionDialogsToBeClosed ();
897+ public static <T > T exit (int i , boolean waitToCloseExceptionDialogs ) {
898+ LOG .debug ("JNLPRuntime,exit()" );
899+ if (waitToCloseExceptionDialogs ) {
900+ waitForExceptionDialogsToBeClosed ();
901+ }
899902 System .exit (i );
900903 return null ;
901904 }
902905
906+ public static <T > T exit (int i ) {
907+ return exit (i , true );
908+ }
909+
903910 public static void waitForExceptionDialogsToBeClosed () {
904911 try {
905912 if (BasicExceptionDialog .areShown ()) {
You can’t perform that action at this time.
0 commit comments