diff options
author | Daniel Black <grooverdan@users.sourceforge.net> | 2018-06-30 21:23:21 +1000 |
---|---|---|
committer | Vicențiu-Marian Ciorbaru <vicentiu@mariadb.org> | 2018-08-25 18:27:14 +0300 |
commit | 6b22cc4ae074276eb0adca4c7a7a0b99cc6ca56b (patch) | |
tree | 92af6f407f3dea0413dc370b19ff4061ff84b8b2 /storage/connect/javaconn.cpp | |
parent | 4ba6327f9560a23c128c2434d0fe6511d0d94452 (diff) | |
download | mariadb-git-6b22cc4ae074276eb0adca4c7a7a0b99cc6ca56b.tar.gz |
connect engine: GetStringUTFChars takes pointer arg
Avoids compile errors of the form:
/storage/connect/jdbconn.cpp:1473:41: error: cannot initialize a parameter of type 'jboolean *' (aka 'unsigned char *') with an rvalue of type 'jboolean' (aka 'unsigned char')
name = env->GetStringUTFChars(label, (jboolean)false);
^~~~~~~~~~~~~~~
/usr/lib/jvm/java-8-oracle/include/jni.h:1616:58: note: passing argument to parameter 'isCopy' here
const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
Diffstat (limited to 'storage/connect/javaconn.cpp')
-rw-r--r-- | storage/connect/javaconn.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/connect/javaconn.cpp b/storage/connect/javaconn.cpp index d1be0ca1848..e73149486a8 100644 --- a/storage/connect/javaconn.cpp +++ b/storage/connect/javaconn.cpp @@ -153,7 +153,7 @@ bool JAVAConn::Check(jint rc) if (exc != nullptr && tid != nullptr) { jstring s = (jstring)env->CallObjectMethod(exc, tid); - const char *utf = env->GetStringUTFChars(s, (jboolean)false); + const char *utf = env->GetStringUTFChars(s, NULL); env->DeleteLocalRef(s); Msg = PlugDup(m_G, utf); } else @@ -162,7 +162,7 @@ bool JAVAConn::Check(jint rc) env->ExceptionClear(); } else if (rc < 0) { s = (jstring)env->CallObjectMethod(job, errid); - Msg = (char*)env->GetStringUTFChars(s, (jboolean)false); + Msg = (char*)env->GetStringUTFChars(s, NULL); } else Msg = NULL; |