@@ -50,9 +50,9 @@ public List<String> getTargetList() {
5050 fileOutputStream .getChannel ().transferFrom (readableByteChannel , 0 , Long .MAX_VALUE );
5151 fileOutputStream .close ();
5252 } catch (IOException e ) {
53- LOGGER .error ("Could not download the current " + listName + " list with error " , e );
53+ LOGGER .error ("Could not download the current {} list with error " , listName , e );
5454 }
55- LOGGER .info ("Unzipping current " + listName + " list..." );
55+ LOGGER .info ("Unzipping current {} list..." , listName );
5656 try (InflaterInputStream zis = getZipInputStream (zipFilename )) {
5757 if (zis instanceof ZipInputStream ) {
5858 ((ZipInputStream ) zis ).getNextEntry ();
@@ -67,9 +67,9 @@ public List<String> getTargetList() {
6767 }
6868 fos .close ();
6969 } catch (IOException e ) {
70- LOGGER .error ("Could not unzip the current " + listName + " list with error " , e );
70+ LOGGER .error ("Could not unzip the current {} list with error " , listName , e );
7171 }
72- LOGGER .info ("Reading first {} hosts from current " + listName + " list..." , number );
72+ LOGGER .info ("Reading first {} hosts from current {} list..." , number , listName );
7373 // currently hosts are in order. e.g. top 1000 hosts come first but that does not have to be
7474 // the case. Therefore, we parse every line until we hit the specified number of hosts
7575 try (Stream <String > lines = Files .lines (Paths .get (outputFile ))) {
@@ -81,12 +81,12 @@ public List<String> getTargetList() {
8181 try {
8282 Files .delete (Path .of (zipFilename ));
8383 } catch (IOException e ) {
84- LOGGER .error ("Could not delete " + zipFilename + " : " , e );
84+ LOGGER .error ("Could not delete {} : " , zipFilename , e );
8585 }
8686 try {
8787 Files .delete (Path .of (outputFile ));
8888 } catch (IOException e ) {
89- LOGGER .error ("Could not delete " + outputFile + " : " , e );
89+ LOGGER .error ("Could not delete {} : " , outputFile , e );
9090 }
9191 return targetList ;
9292 }
0 commit comments