@@ -100,7 +100,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
100100
101101 String action = obj .getString ("action" );
102102
103- LOG .info ("Executing: [" + action + "]" );
103+ LOG .info ("[{}] Executing..." , action );
104104 String path = "" ;
105105 String filename = "" ;
106106 String opt = "" ;
@@ -114,7 +114,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
114114 if (obj .has ("filename" )) {
115115 filename = obj .getString ("filename" );
116116 }
117- LOG .info ("Cleaning files from '{}'." , filename );
117+ LOG .info ("[{}] Cleaning files from '{}'." , action , filename );
118118 actionResult = clean_folder (filename , authorisedFolderScope );
119119
120120 break ;
@@ -132,7 +132,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
132132 if (obj .has ("option" )) {
133133 opt = obj .getString ("option" );
134134 }
135- LOG .info ("Saving local file to path '{}' with option '{}'." , filename , opt );
135+ LOG .info ("[{}] Saving local file to path '{}' with option '{}'." , action , filename , opt );
136136 actionResult = upload_files (filename , contentBase64 , opt , authorisedFolderScope );
137137
138138 break ;
@@ -151,7 +151,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
151151 if (obj .has ("option" )) {
152152 opt = obj .getString ("option" );
153153 }
154- LOG .info ("Getting {} local file(s) from '{}'." , nbfiles , filename );
154+ LOG .info ("[{}] Getting {} local file(s) from '{}'." , action , nbfiles , filename );
155155 actionResult = download_files (filename , nbfiles , opt , authorisedFolderScope );
156156
157157 break ;
@@ -163,7 +163,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
163163 /**
164164 * Log and return actionResult
165165 */
166- LOG .info ("[" + action + "] finish with result: " + actionResult .get ("status" ));
166+ LOG .info ("[{}] finish with result: {}" , action , actionResult .get ("status" ));
167167 os .println (actionResult .toString (1 ));
168168
169169 is .close ();
@@ -393,7 +393,7 @@ private JSONObject download_files(String filenamecomplete, int nbfiles, String o
393393 if ("LASMODIFIED" .equals (opt )) {
394394 Collections .sort (files , new Comparator <File >() {
395395 public int compare (File o1 , File o2 ) {
396- return new Long (o2 .lastModified ()). compareTo ( o1 .lastModified ());
396+ return Long . compare (o2 .lastModified (), o1 .lastModified ());
397397 }
398398 });
399399 } else if ("IGNORECASEDESC" .equals (opt )) {
0 commit comments