"include/vscode:/vscode.git/clone" did not exist on "bfb0217a02182d8a43c4e678ab3d71c04eeb2e2d"
Commit 7b2963d9 authored by Ilya Matiach's avatar Ilya Matiach Committed by Guolin Ke
Browse files

[Java] add missing JNI exception checks to fix warnings (#2405)

* add missing JNI exception checks to fix warnings

* updated based on comments

* removed rethrow logic

* replace tabs with spaces
parent a0a117aa
...@@ -156,7 +156,13 @@ ...@@ -156,7 +156,13 @@
// get the size, indices and values // get the size, indices and values
auto indices = (jintArray)jenv->CallObjectMethod(objSparseVec, sparseVectorIndices); auto indices = (jintArray)jenv->CallObjectMethod(objSparseVec, sparseVectorIndices);
if (jenv->ExceptionCheck()) {
return -1;
}
auto values = (jdoubleArray)jenv->CallObjectMethod(objSparseVec, sparseVectorValues); auto values = (jdoubleArray)jenv->CallObjectMethod(objSparseVec, sparseVectorValues);
if (jenv->ExceptionCheck()) {
return -1;
}
int size = jenv->GetArrayLength(indices); int size = jenv->GetArrayLength(indices);
// Note: when testing on larger data (e.g. 288k rows per partition and 36mio rows total) // Note: when testing on larger data (e.g. 288k rows per partition and 36mio rows total)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment