Index: jni/JniWebRequest.cpp |
diff --git a/jni/JniWebRequest.cpp b/jni/JniWebRequest.cpp |
index 172a6a0ddc829902b6000abca58dfc31de4f1662..54cad5fd386817bef36cf74c67de5efeafa58450 100644 |
--- a/jni/JniWebRequest.cpp |
+++ b/jni/JniWebRequest.cpp |
@@ -32,10 +32,10 @@ static void JNICALL JniDtor(JNIEnv* env, jclass clazz, jlong ptr) |
} |
JniWebRequest::JniWebRequest(JNIEnv* env, jobject callbackObject) |
- : JniCallbackBase(env, callbackObject), AdblockPlus::WebRequest() |
+ : JniCallbackBase(env, callbackObject), AdblockPlus::WebRequest(), |
+ tupleClass(new JniGlobalReference<jclass>(env, env->FindClass(PKG("HeaderEntry")))), |
+ serverResponseClass(new JniGlobalReference<jclass>(env, env->FindClass(PKG("ServerResponse")))) |
{ |
- tupleClass.reset(new JniGlobalReference<jclass>(env, env->FindClass("com/github/rjeschke/neetutils/collections/Tuple"))); |
- serverResponseClass.reset(new JniGlobalReference<jclass>(env, env->FindClass(PKG("ServerResponse")))); |
} |
AdblockPlus::ServerResponse JniWebRequest::GET(const std::string& url, const AdblockPlus::HeaderList& requestHeaders) const |
@@ -75,7 +75,7 @@ AdblockPlus::ServerResponse JniWebRequest::GET(const std::string& url, const Adb |
jobject JniWebRequest::NewTuple(JNIEnv* env, const std::string& a, const std::string& b) const |
{ |
- jmethodID factory = env->GetMethodID(tupleClass->Get(), "<init>", "(Ljava/lang/Object;Ljava/lang/Object;)V"); |
+ jmethodID factory = env->GetMethodID(tupleClass->Get(), "<init>", "(Ljava/lang/String;Ljava/lang/String;)V"); |
return env->NewObject(tupleClass->Get(), factory, env->NewStringUTF(a.c_str()), env->NewStringUTF(b.c_str())); |
} |