ntcore: Change params in Java RpcAnswer from String to byte[] (#1280)

The underlying protocol uses raw bytes, so they should not be required to be
a valid string.
This commit is contained in:
Peter Johnson
2018-08-20 13:07:13 -07:00
committed by GitHub
parent 5283726cce
commit 7b95c5341a
2 changed files with 5 additions and 5 deletions

View File

@@ -270,10 +270,10 @@ static jobject MakeJObject(JNIEnv* env, jobject inst,
static jmethodID constructor =
env->GetMethodID(rpcAnswerCls, "<init>",
"(Ledu/wpi/first/networktables/"
"NetworkTableInstance;IILjava/lang/String;Ljava/lang/"
"String;Ledu/wpi/first/networktables/ConnectionInfo;)V");
"NetworkTableInstance;IILjava/lang/String;[B"
"Ledu/wpi/first/networktables/ConnectionInfo;)V");
JLocal<jstring> name{env, MakeJString(env, answer.name)};
JLocal<jstring> params{env, MakeJString(env, answer.params)};
JLocal<jbyteArray> params{env, MakeJByteArray(env, answer.params)};
JLocal<jobject> conn{env, MakeJObject(env, answer.conn)};
return env->NewObject(rpcAnswerCls, constructor, inst, (jint)answer.entry,
(jint)answer.call, name.obj(), params.obj(),