11/*******************************************************************************
2- * Copyright (c) 2013, 2023 Red Hat, Inc.
2+ * Copyright (c) 2013, 2025 Red Hat, Inc.
33 *
44 * This program and the accompanying materials are made
55 * available under the terms of the Eclipse Public License 2.0
2020import java .io .File ;
2121import java .io .IOException ;
2222import java .net .HttpURLConnection ;
23+ import java .net .URI ;
2324import java .net .URL ;
2425
2526import org .eclipse .core .resources .IContainer ;
@@ -212,16 +213,16 @@ public void checkPreparedSources(RPMProject project, RPMProjectLayout layout) th
212213 switch (layout ) {
213214 case RPMBUILD :
214215 assertNotNull (buildFolder .getParent ().findMember ("BUILD" ));
215- assertEquals (2 , buildFolder .members ().length );
216+ assertEquals (1 , buildFolder .members ().length );
216217 // check if the file exists under BUILD folder
217- helloBuildFolder = buildFolder .getFolder (new Path ("hello-2.12.1" ));
218+ helloBuildFolder = buildFolder .getFolder (new Path ("hello-2.12.1-build " ));
218219 assertTrue (helloBuildFolder .exists ());
219220 // there should be some stuff within hello-2.8/ folder
220221 assertTrue (helloBuildFolder .members ().length >= 1 );
221222 break ;
222223 case FLAT :
223- assertEquals (10 , buildFolder .members ().length );
224- helloBuildFolder = buildFolder .getFolder (new Path ("hello-2.12.1" ));
224+ assertEquals (9 , buildFolder .members ().length );
225+ helloBuildFolder = buildFolder .getFolder (new Path ("hello-2.12.1-build " ));
225226 assertTrue (helloBuildFolder .exists ());
226227 // there should be some stuff within hello-2.12.1/ folder
227228 assertTrue (helloBuildFolder .members ().length >= 1 );
@@ -238,7 +239,7 @@ public void checkPreparedSources(RPMProject project, RPMProjectLayout layout) th
238239 */
239240 public void downloadFile (RPMProject project ) throws IOException , InterruptedException {
240241 // connect to the URL
241- URL url = new URL ("http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz" );
242+ URL url = URI . create ("http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz" ). toURL ( );
242243 HttpURLConnection connection = (HttpURLConnection ) url .openConnection ();
243244 assertEquals (HttpURLConnection .HTTP_OK , connection .getResponseCode ());
244245
0 commit comments