Skip to content
Snippets Groups Projects
Commit e6a9d52f authored by gmantele's avatar gmantele
Browse files

[UWS] Fix synchronization bug while generating the default Job ID

parent 0e249847
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,6 @@ package uws.job;
import java.io.IOException;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.FieldPosition;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
......@@ -122,7 +119,7 @@ import uws.service.log.UWSLog.LogLevel;
* </ul>
*
* @author Gr&eacute;gory Mantelet (CDS;ARI)
* @version 4.1 (08/2014)
* @version 4.1 (10/2014)
*/
public class UWSJob extends SerializableUWSObject {
private static final long serialVersionUID = 1L;
......@@ -394,6 +391,7 @@ public class UWSJob extends SerializableUWSObject {
* @return A unique job identifier.
*/
protected String generateJobId(){
synchronized(lastId){
String generatedId = System.currentTimeMillis() + "A";
if (lastId != null){
while(lastId.equals(generatedId))
......@@ -402,6 +400,7 @@ public class UWSJob extends SerializableUWSObject {
lastId = generatedId;
return generatedId;
}
}
/**
* <p>Gets the value of the specified parameter.</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment