make Version a plain data class
This commit is contained in:
parent
6cc055dbba
commit
6102c70855
4 changed files with 27 additions and 22 deletions
|
@ -312,16 +312,13 @@ jobject newNetworkConfig(JNIEnv *env, const ZT_VirtualNetworkConfig &vnetConfig)
|
|||
jobject newVersion(JNIEnv *env, int major, int minor, int rev)
|
||||
{
|
||||
// create a com.zerotier.sdk.Version object
|
||||
jobject versionObj = env->NewObject(Version_class, Version_ctor);
|
||||
jobject versionObj = env->NewObject(Version_class, Version_ctor, major, minor, rev);
|
||||
if(env->ExceptionCheck() || versionObj == NULL)
|
||||
{
|
||||
LOGE("Error creating new Version object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
env->SetIntField(versionObj, Version_major_field, (jint)major);
|
||||
env->SetIntField(versionObj, Version_minor_field, (jint)minor);
|
||||
env->SetIntField(versionObj, Version_revision_field, (jint)rev);
|
||||
|
||||
return versionObj;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue