diff --git a/java/jni/ZT_jniutils.cpp b/java/jni/ZT_jniutils.cpp index 5f54751d6..d7d205a74 100644 --- a/java/jni/ZT_jniutils.cpp +++ b/java/jni/ZT_jniutils.cpp @@ -710,14 +710,16 @@ jobject newNetworkConfig(JNIEnv *env, const ZT_VirtualNetworkConfig &vnetConfig) return NULL; } - assignedAddressesField = lookup.findField(vnetConfigClass, "assignedAddresses", "[Ljava/net/InetSocketAddress;"); + assignedAddressesField = lookup.findField(vnetConfigClass, "assignedAddresses", + "[Ljava/net/InetSocketAddress;"); if(env->ExceptionCheck() || assignedAddressesField == NULL) { LOGE("Error getting assignedAddresses field"); return NULL; } - routesField = lookup.findField(vnetConfigClass, "routes", "[Lcom/zerotier/sdk/VirtualNetworkRoute"); + routesField = lookup.findField(vnetConfigClass, "routes", + "[Lcom/zerotier/sdk/VirtualNetworkRoute;"); if(env->ExceptionCheck() || routesField == NULL) { LOGE("Error getting routes field"); diff --git a/java/src/com/zerotier/sdk/VirtualNetworkRoute.java b/java/src/com/zerotier/sdk/VirtualNetworkRoute.java index 32376cb9a..738c4158f 100644 --- a/java/src/com/zerotier/sdk/VirtualNetworkRoute.java +++ b/java/src/com/zerotier/sdk/VirtualNetworkRoute.java @@ -29,7 +29,7 @@ package com.zerotier.sdk; import java.net.InetSocketAddress; -public class VirtualNetworkRoute +public final class VirtualNetworkRoute { private VirtualNetworkRoute() {} diff --git a/java/src/com/zerotier/sdk/VirtualnetworkRoute.java b/java/src/com/zerotier/sdk/VirtualnetworkRoute.java deleted file mode 100644 index 32376cb9a..000000000 --- a/java/src/com/zerotier/sdk/VirtualnetworkRoute.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -package com.zerotier.sdk; - -import java.net.InetSocketAddress; - -public class VirtualNetworkRoute -{ - private VirtualNetworkRoute() {} - - /** - * Target network / netmask bits (in port field) or NULL or 0.0.0.0/0 for default - */ - public InetSocketAddress target; - - /** - * Gateway IP address (port ignored) or NULL (family == 0) for LAN-local (no gateway) - */ - public InetSocketAddress via; - - /** - * Route flags - */ - public int flags; - - /** - * Route metric (not currently used) - */ - public int metric; -}