Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit d994f29

Browse files
committed
Merge pull request #488 from nrgraham23/java_handle_bugfix
Java null handle bugfix
2 parents 5a80ea1 + b91fbe7 commit d994f29

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ompi/mpi/java/java/Request.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,12 @@ protected static long[] getHandles(Request[] r)
471471
{
472472
long[] h = new long[r.length];
473473

474-
for(int i = 0; i < r.length; i++)
475-
h[i] = r[i].handle;
474+
for(int i = 0; i < r.length; i++) {
475+
if(r[i] != null)
476+
h[i] = r[i].handle;
477+
else
478+
h[i] = 0;
479+
}
476480

477481
return h;
478482
}

0 commit comments

Comments
 (0)