From 02a4a7f5f43d7aea550a027051b6b72eaad24330 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9gory=20Mantelet?=
 <gregory.mantelet@astro.unistra.fr>
Date: Wed, 5 Sep 2018 10:54:12 +0200
Subject: [PATCH] [UWS,TAP] Fix destruction of a job: error files were never
 deleted.

This bug occurred "just" due to an un-desired inverted test, since UWS-1.1 is
implemented (UWSLib-4.3 and TAPLib-2.2).
---
 src/uws/job/UWSJob.java | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/uws/job/UWSJob.java b/src/uws/job/UWSJob.java
index d13cc22..4110865 100644
--- a/src/uws/job/UWSJob.java
+++ b/src/uws/job/UWSJob.java
@@ -130,7 +130,7 @@ import uws.service.request.UploadFile;
  * </ul>
  *
  * @author	Gr&eacute;gory Mantelet (CDS;ARI)
- * @version	4.3 (03/2018)
+ * @version	4.4 (09/2018)
  */
 public class UWSJob extends SerializableUWSObject {
 	private static final long serialVersionUID = 1L;
@@ -302,7 +302,7 @@ public class UWSJob extends SerializableUWSObject {
 	protected ErrorSummary errorSummary = null;
 
 	/** This is a list of all results of this job. */
-	protected Map<String,Result> results;
+	protected Map<String, Result> results;
 
 	/** List of all input parameters (UWS standard and non-standard parameters). */
 	protected final UWSParameters inputParams;
@@ -370,7 +370,7 @@ public class UWSJob extends SerializableUWSObject {
 
 		phase = new JobPhase(this);
 
-		results = new HashMap<String,Result>();
+		results = new HashMap<String, Result>();
 
 		inputParams = (params == null ? new UWSParameters() : params);
 		inputParams.init();
@@ -383,7 +383,8 @@ public class UWSJob extends SerializableUWSObject {
 		while(files.hasNext()){
 			try{
 				files.next().move(this);
-			}catch(IOException ioe){}
+			}catch(IOException ioe){
+			}
 		}
 	}
 
@@ -417,7 +418,7 @@ public class UWSJob extends SerializableUWSObject {
 
 		phase = new JobPhase(this);
 
-		results = new HashMap<String,Result>();
+		results = new HashMap<String, Result>();
 
 		inputParams = (params == null ? new UWSParameters() : params);
 		inputParams.init();
@@ -438,7 +439,8 @@ public class UWSJob extends SerializableUWSObject {
 		while(files.hasNext()){
 			try{
 				files.next().move(this);
-			}catch(IOException ioe){}
+			}catch(IOException ioe){
+			}
 		}
 	}
 
@@ -491,7 +493,7 @@ public class UWSJob extends SerializableUWSObject {
 		if (endTime > 0)
 			this.endTime = new Date(endTime);
 
-		this.results = new HashMap<String,Result>();
+		this.results = new HashMap<String, Result>();
 		if (results != null){
 			for(Result r : results){
 				if (r != null)
@@ -1964,7 +1966,7 @@ public class UWSJob extends SerializableUWSObject {
 			}
 		}
 
-		if (!fullClean){
+		if (fullClean){
 			// Clear the error file:
 			if (errorSummary != null && errorSummary.hasDetail()){
 				try{
-- 
GitLab