@@ -234,27 +234,29 @@ public static String hex(String origName, String candidate) throws NoSuchAlgorit
234234 * @param title name of the download
235235 */
236236 public static void waitForResources (final JNLPClassLoader jnlpClassLoader , final ResourceTracker tracker , final URL [] resources , final String title ) {
237- // download first initial jar : so in case of client certificate, only 1 https client handshake is done
237+ // download first initial jar : so in case of client certificate, only 1 https client handshake is done
238238 boolean downloadInitialJarFirst = resources .length > 1 && resources [0 ].getProtocol ().equals ("https" );
239239 try {
240240 final DownloadIndicator indicator = Optional .ofNullable (JNLPRuntime .getDefaultDownloadIndicator ())
241- .orElseGet (() -> new DummyDownloadIndicator () );
241+ .orElseGet (DummyDownloadIndicator :: new );
242242 final DownloadServiceListener listener = getDownloadServiceListener (jnlpClassLoader , title , resources , indicator );
243243 try {
244244 for (URL url : resources ) {
245245 tracker .addDownloadListener (url , resources , listener );
246246 }
247- if (downloadInitialJarFirst )
247+ if (downloadInitialJarFirst ) {
248248 tracker .waitForResources (resources [0 ]);
249+ }
249250 // download all remaining ones
250251 tracker .waitForResources (resources );
251252 } finally {
252253 indicator .disposeListener (listener );
253254 }
254255 } catch (Exception ex ) {
255256 LOG .error ("Downloading of resources ended with error" , ex );
256- if (downloadInitialJarFirst )
257- throw new RuntimeException (ex );
257+ if (downloadInitialJarFirst ) {
258+ throw new RuntimeException (ex );
259+ }
258260 }
259261 }
260262
0 commit comments