Skip to content

Commit 8c378ac

Browse files
addressed more comments
1 parent 6e7978e commit 8c378ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/native/xxhash.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ JNIEXPORT jbyteArray JNICALL Java_software_amazon_awssdk_crt_checksums_XXHash_xx
107107
struct aws_byte_cursor c_byte_array = aws_jni_byte_cursor_from_jbyteArray_critical_acquire(env, input);
108108
if (AWS_UNLIKELY(c_byte_array.ptr == NULL)) {
109109
aws_jni_throw_runtime_exception(env, "XXHash.xxHash3_128Compute: failed to pin input bytes");
110-
goto on_done;
110+
goto on_done;
111111
}
112112

113113
int result = aws_xxhash3_128_compute(seed, c_byte_array, &hash_buffer);
@@ -134,6 +134,7 @@ jlong JNICALL
134134

135135
struct aws_xxhash *hash = aws_xxhash64_new(aws_jni_get_allocator(), seed);
136136
if (hash == NULL) {
137+
aws_jni_throw_runtime_exception(env, "XXHash.XXHash64Create: create xxhash64 instance failed");
137138
return (jlong)0;
138139
}
139140

@@ -151,6 +152,7 @@ jlong JNICALL
151152

152153
struct aws_xxhash *hash = aws_xxhash3_64_new(aws_jni_get_allocator(), seed);
153154
if (hash == NULL) {
155+
aws_jni_throw_runtime_exception(env, "XXHash.XXHash3_64Create: create xxhash3_64 instance failed");
154156
return (jlong)0;
155157
}
156158

@@ -168,6 +170,7 @@ jlong JNICALL
168170

169171
struct aws_xxhash *hash = aws_xxhash3_128_new(aws_jni_get_allocator(), seed);
170172
if (hash == NULL) {
173+
aws_jni_throw_runtime_exception(env, "XXHash.XXHash3_128Create: create xxhash3_128 instance failed");
171174
return (jlong)0;
172175
}
173176

0 commit comments

Comments
 (0)