Skip to content

Commit cf7c73d

Browse files
committed
- sets the auto-generated ids to be positive for user-friendliness
1 parent cbcf537 commit cf7c73d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/microsoft/graph/content/MSBatchRequestContent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public boolean addBatchRequestStep(final MSBatchRequestStep batchRequestStep) {
6969
public String addBatchRequestStep(final Request request, final String... arrayOfDependsOnIds) {
7070
String requestId;
7171
do {
72-
requestId = Integer.toString(ThreadLocalRandom.current().nextInt());
72+
requestId = Integer.toString(ThreadLocalRandom.current().nextInt(1, Integer.MAX_VALUE));
7373
} while(batchRequestStepsHashMap.keySet().contains(requestId));
7474
if(addBatchRequestStep(new MSBatchRequestStep(requestId, request, Arrays.asList(arrayOfDependsOnIds))))
7575
return requestId;

0 commit comments

Comments
 (0)