Protect accesses to the static field with a static lock, to make sure
that all requests really have different IDs. Now that coalesced
requests are put in a Set, the IDs matter.
Change-Id: Iccb226aa6969c8150e0c8cc506b8c68a94e902ee
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/37759
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
int nbRequested,
ExecutionType priority) {
- fRequestId = fRequestNumber++;
+ synchronized (this.getClass()) {
+ fRequestId = fRequestNumber++;
+ }
fDataType = dataType;
fIndex = index;
fNbRequested = nbRequested;
/**
* Resets the request counter (used for testing)
*/
- public static void reset() {
+ public static synchronized void reset() {
fRequestNumber = 0;
}