Commit 8ab6d808 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Fixed inspection results of Null/NonNull

parent 7ecdf734
......@@ -34,6 +34,7 @@ import android.widget.Toast;
import com.frostnerd.dnschanger.R;
import com.frostnerd.dnschanger.util.ThemeHandler;
import com.frostnerd.utils.general.DesignUtil;
import com.frostnerd.utils.general.Utils;
import com.frostnerd.utils.lifecyclehelper.UtilityActivity;
import java.lang.ref.SoftReference;
......@@ -67,7 +68,7 @@ public class AppSelectionActivity extends UtilityActivity implements SearchView.
setContentView(R.layout.activity_app_select);
appList = findViewById(R.id.app_list);
fabSettings = findViewById(R.id.fab_settings);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Utils.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
onlyInternet = getIntent() != null && getIntent().getBooleanExtra("onlyInternet",false);
currentSelected = getIntent() != null && getIntent().hasExtra("apps") ? getIntent().getStringArrayListExtra("apps") : new ArrayList<String>();
......@@ -285,7 +286,7 @@ public class AppSelectionActivity extends UtilityActivity implements SearchView.
if (isChecked) currentSelected.add(holder.appEntry.get().getPackageName());
else currentSelected.remove(holder.appEntry.get().getPackageName());
listAdapter.notifyItemChanged(0);
getSupportActionBar().setSubtitle(getString(R.string.x_apps_selected).replace("[[x]]", currentSelected.size() + ""));
Utils.requireNonNull(getSupportActionBar()).setSubtitle(getString(R.string.x_apps_selected).replace("[[x]]", currentSelected.size() + ""));
changed = true;
}
});
......
......@@ -194,7 +194,7 @@ public class MainActivity extends NavigationDrawerActivity implements RuleImport
if(getCurrentFragment() == settingsFragment){
getMenuInflater().inflate(R.menu.menu_settings, menu);
SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE);
SearchManager searchManager = Utils.requireNonNull((SearchManager)getSystemService(Context.SEARCH_SERVICE));
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
......
......@@ -123,8 +123,8 @@ public class PinActivity extends UtilityActivity {
});
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M && PreferencesAccessor.canUseFingerprintForPin(this)) {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.USE_FINGERPRINT) == PackageManager.PERMISSION_GRANTED){
FingerprintManager fingerprintManager = (FingerprintManager) getSystemService(FINGERPRINT_SERVICE);
KeyguardManager keyguardManager = getSystemService(KeyguardManager.class);
FingerprintManager fingerprintManager = Utils.requireNonNull((FingerprintManager) getSystemService(FINGERPRINT_SERVICE));
KeyguardManager keyguardManager = Utils.requireNonNull(getSystemService(KeyguardManager.class));
fingerprintImage = findViewById(R.id.image);
if(fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints() && keyguardManager.isKeyguardSecure()) {
handler = new Handler();
......
......@@ -9,6 +9,7 @@ import android.support.annotation.Nullable;
import com.frostnerd.dnschanger.LogFactory;
import com.frostnerd.dnschanger.util.ThemeHandler;
import com.frostnerd.utils.general.Utils;
import com.frostnerd.utils.permissions.PermissionsUtil;
import com.frostnerd.dnschanger.util.Preferences;
import com.frostnerd.utils.preferences.util.PreferenceHelper;
......@@ -37,8 +38,8 @@ public class SettingsImportActivity extends Activity {
setTheme(ThemeHandler.getAppTheme(this));
LogFactory.writeMessage(this, LOG_TAG, "Created activity", getIntent());
Intent intent = getIntent();
if (intent.getAction().equals(Intent.ACTION_VIEW) && PermissionsUtil.canReadExternalStorage(this)) {
Uri uri = intent.getData();
if (intent.getAction() != null && intent.getAction().equals(Intent.ACTION_VIEW) && PermissionsUtil.canReadExternalStorage(this)) {
Uri uri = Utils.requireNonNull(intent.getData());
LogFactory.writeMessage(this, LOG_TAG, "Importing from given URI: " + uri);
try {
importFromStream(this, this.getContentResolver().openInputStream(uri));
......
......@@ -44,6 +44,7 @@ public class ShortcutActivity extends AppCompatActivity {
if(!TextUtils.isEmpty(dns1v6))upstreamServers.add(new IPPortPair(dns1v6, 53, true));
if(!TextUtils.isEmpty(dns2v6))upstreamServers.add(new IPPortPair(dns2v6, 53, true));
}
//noinspection ConstantConditions
LogFactory.writeMessage(this, LOG_TAG, upstreamServers.toString());
if(Util.isServiceRunning(this)){
LogFactory.writeMessage(this, LOG_TAG, "Service is already running");
......
......@@ -118,6 +118,7 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
}
}
@SuppressWarnings("ConstantConditions")
@Override
public synchronized void close() {
instance = null;
......
......@@ -26,10 +26,10 @@ public class DNSResolver {
public DNSResolver(Context context) {
db = DatabaseHelper.getInstance(context);
ParsedEntity<DNSRule> ruleEntity = db.getSQLHandler(DNSRule.class);
Column<DNSRule> targetColumn = ruleEntity.getTable().findColumn("target");
Column<DNSRule> hostColumn = ruleEntity.getTable().findColumn("host");
Column<DNSRule> ipv6Column = ruleEntity.getTable().findColumn("ipv6");
Column<DNSRule> wildcardColumn = ruleEntity.getTable().findColumn("wildcard");
Column<DNSRule> targetColumn = ruleEntity.getTable().requireColumn("target");
Column<DNSRule> hostColumn = ruleEntity.getTable().requireColumn("host");
Column<DNSRule> ipv6Column = ruleEntity.getTable().requireColumn("ipv6");
Column<DNSRule> wildcardColumn = ruleEntity.getTable().requireColumn("wildcard");
wildcardCount = ruleEntity.getCount(db, WhereCondition.equal(wildcardColumn, "1"));
WILDCARD_QUERY_RANDOM = "SELECT " + targetColumn.getColumnName() + " FROM " + ruleEntity.getTableName() +
" WHERE " + ipv6Column.getColumnName() + "" + "=? AND " + wildcardColumn.getColumnName()
......
......@@ -19,9 +19,9 @@ public class QueryLogger {
public QueryLogger(DatabaseHelper databaseHelper){
this.helper = databaseHelper;
String host = databaseHelper.findColumn(DNSQuery.class, "host").getColumnName(),
ipv6 = databaseHelper.findColumn(DNSQuery.class, "ipv6").getColumnName(),
time = databaseHelper.findColumn(DNSQuery.class, "time").getColumnName();
String host = databaseHelper.findColumnOrThrow(DNSQuery.class, "host").getColumnName(),
ipv6 = databaseHelper.findColumnOrThrow(DNSQuery.class, "ipv6").getColumnName(),
time = databaseHelper.findColumnOrThrow(DNSQuery.class, "time").getColumnName();
insertStatement = "INSERT INTO " + databaseHelper.getTableName(DNSQuery.class) + "(" + host +
"," + ipv6 + "," + time + ")VALUES(?,?,?)";
}
......
......@@ -83,6 +83,7 @@ public class DNSEntryListDialog extends UtilityDialog {
}
}).show();
}else {
//noinspection ConstantConditions
new DNSCreationDialog(getContext(), new DNSCreationDialog.OnEditingFinishedListener() {
@Override
public void editingFinished(DNSEntry entry) {
......
......@@ -27,6 +27,7 @@ import com.frostnerd.dnschanger.services.DNSVpnService;
import com.frostnerd.dnschanger.util.PreferencesAccessor;
import com.frostnerd.dnschanger.util.ThemeHandler;
import com.frostnerd.dnschanger.util.Util;
import com.frostnerd.utils.general.Utils;
import java.net.Inet4Address;
import java.net.Inet6Address;
......@@ -51,7 +52,7 @@ public class CurrentNetworksFragment extends Fragment {
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
View content = inflater.inflate(R.layout.fragment_current_networks, container, false);
ConnectivityManager mgr = (ConnectivityManager) requireContext().getSystemService(Context.CONNECTIVITY_SERVICE);
ConnectivityManager mgr = Utils.requireNonNull((ConnectivityManager) requireContext().getSystemService(Context.CONNECTIVITY_SERVICE));
DNSProperties dnsProperty;
boolean vpnRunning = Util.isServiceThreadRunning();
for(Network ntw: mgr.getAllNetworks()){
......
......@@ -52,6 +52,7 @@ import com.frostnerd.dnschanger.util.Util;
import com.frostnerd.utils.design.MaterialEditText;
import com.frostnerd.utils.design.dialogs.LoadingDialog;
import com.frostnerd.dnschanger.util.Preferences;
import com.frostnerd.utils.general.Utils;
import com.frostnerd.utils.textfilers.InputCharacterFilter;
import org.xbill.DNS.DClass;
......@@ -320,9 +321,9 @@ public class MainFragment extends Fragment {
LocalBroadcastManager.getInstance(requireContext()).registerReceiver(serviceStateReceiver, new IntentFilter(Util.BROADCAST_SERVICE_STATUS_CHANGE));
LocalBroadcastManager.getInstance(requireContext()).sendBroadcast(new Intent(Util.BROADCAST_SERVICE_STATE_REQUEST));
setEditTextState();
((AppCompatActivity)requireContext()).getSupportActionBar().setSubtitle(getString(R.string.subtitle_configuring).replace("[[x]]",settingV6 ? "Ipv6" : "Ipv4"));
Util.getActivity(this).invalidateOptionsMenu();
Util.getActivity(this).getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
Utils.requireNonNull(((AppCompatActivity)requireContext()).getSupportActionBar()).setSubtitle(getString(R.string.subtitle_configuring).replace("[[x]]",settingV6 ? "Ipv6" : "Ipv4"));
Utils.requireNonNull(Util.getActivity(this)).invalidateOptionsMenu();
Utils.requireNonNull(Util.getActivity(this)).getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}
@Override
......
......@@ -24,6 +24,7 @@ import com.frostnerd.dnschanger.database.DatabaseHelper;
import com.frostnerd.dnschanger.database.accessors.QueryLogger;
import com.frostnerd.dnschanger.database.entities.DNSQuery;
import com.frostnerd.dnschanger.util.Util;
import com.frostnerd.utils.general.Utils;
/**
* Copyright Daniel Wolf 2017
......@@ -104,7 +105,7 @@ public class QueryLogFragment extends Fragment implements SearchView.OnQueryText
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.menu_rules, menu);
SearchManager searchManager = (SearchManager) requireContext().getSystemService(Context.SEARCH_SERVICE);
SearchManager searchManager = Utils.requireNonNull((SearchManager) requireContext().getSystemService(Context.SEARCH_SERVICE));
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
searchView.setSearchableInfo(searchManager.getSearchableInfo(Util.getActivity(this).getComponentName()));
searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
......
......@@ -44,6 +44,7 @@ import com.frostnerd.dnschanger.util.ThemeHandler;
import com.frostnerd.dnschanger.util.Util;
import com.frostnerd.utils.design.MaterialEditText;
import com.frostnerd.utils.general.DesignUtil;
import com.frostnerd.utils.general.Utils;
import com.frostnerd.utils.networking.NetworkUtil;
/**
......@@ -312,7 +313,7 @@ public class RulesFragment extends Fragment implements SearchView.OnQueryTextLis
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.menu_rules, menu);
SearchManager searchManager = (SearchManager) requireContext().getSystemService(Context.SEARCH_SERVICE);
SearchManager searchManager = Utils.requireNonNull((SearchManager) requireContext().getSystemService(Context.SEARCH_SERVICE));
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
searchView.setSearchableInfo(searchManager.getSearchableInfo(Util.getActivity(this).getComponentName()));
searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
......
......@@ -530,7 +530,7 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Search
snackbar.setAction(R.string.show, new View.OnClickListener() {
@Override
public void onClick(View v) {
if(snackbar != null)snackbar.dismiss();
snackbar.dismiss();
Utils.goToLauncher(requireContext());
}
});
......@@ -554,7 +554,7 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Search
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.menu_settings, menu);
SearchManager searchManager = (SearchManager)requireContext().getSystemService(Context.SEARCH_SERVICE);
SearchManager searchManager = Utils.requireNonNull((SearchManager)requireContext().getSystemService(Context.SEARCH_SERVICE));
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
searchView.setSearchableInfo(searchManager.getSearchableInfo(Util.getActivity(this).getComponentName()));
searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
......
......@@ -25,7 +25,7 @@ public class BootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
LogFactory.writeMessage(context, LOG_TAG, "Received an intent ", intent);
if(intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED) || intent.getAction().equals(Intent.ACTION_LOCKED_BOOT_COMPLETED)){
if(intent.getAction() != null && intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED) || intent.getAction().equals(Intent.ACTION_LOCKED_BOOT_COMPLETED)){
LogFactory.writeMessage(context, LOG_TAG, "Action is BOOT_COMPLETED");
LogFactory.writeMessage(context, LOG_TAG, "Starting ConnectivityBackgroundService");
Util.runBackgroundConnectivityCheck(context);
......
......@@ -113,10 +113,10 @@ public class RuleImportService extends Service {
int i = 0, currentCount;
long rowID, lastRowID;
String ruleTableName = DatabaseHelper.getInstance(this).getTableName(DNSRule.class),
columnHost = DatabaseHelper.getInstance(this).findColumn(DNSRule.class, "host").getColumnName(),
columnTarget = DatabaseHelper.getInstance(this).findColumn(DNSRule.class, "target").getColumnName(),
columnIPv6 = DatabaseHelper.getInstance(this).findColumn(DNSRule.class, "ipv6").getColumnName(),
columnWildcard = DatabaseHelper.getInstance(this).findColumn(DNSRule.class, "wildcard").getColumnName();
columnHost = DatabaseHelper.getInstance(this).findColumnOrThrow(DNSRule.class, "host").getColumnName(),
columnTarget = DatabaseHelper.getInstance(this).findColumnOrThrow(DNSRule.class, "target").getColumnName(),
columnIPv6 = DatabaseHelper.getInstance(this).findColumnOrThrow(DNSRule.class, "ipv6").getColumnName(),
columnWildcard = DatabaseHelper.getInstance(this).findColumnOrThrow(DNSRule.class, "wildcard").getColumnName();
values.put(columnWildcard, "0");
while(shouldContinue && configurations.size() != 0){
Configuration configuration = configurations.removeFirst();
......
......@@ -34,6 +34,7 @@ import com.frostnerd.dnschanger.util.ThemeHandler;
import com.frostnerd.dnschanger.util.Util;
import com.frostnerd.utils.design.MaterialEditText;
import com.frostnerd.dnschanger.util.Preferences;
import com.frostnerd.utils.general.Utils;
import com.frostnerd.utils.textfilers.InputCharacterFilter;
import java.util.ArrayList;
......@@ -87,13 +88,14 @@ public class ConfigureActivity extends AppCompatActivity {
}
@SuppressWarnings("ConstantConditions")
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(ThemeHandler.getAppTheme(this));
setContentView(R.layout.tasker_configure_layout);
LogFactory.writeMessage(this, LOG_TAG, "Activity created", getIntent());
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Utils.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
customPorts = PreferencesAccessor.areCustomPortsEnabled(this);
ipv4Enabled = PreferencesAccessor.isIPv4Enabled(this);
......@@ -304,7 +306,7 @@ public class ConfigureActivity extends AppCompatActivity {
setInputType();
ed_dns1.setText(settingV6 ? dns1V6.formatForTextfield(customPorts) : dns1.formatForTextfield(customPorts));
ed_dns2.setText(settingV6 ? dns2V6.formatForTextfield(customPorts) : dns2.formatForTextfield(customPorts));
getSupportActionBar().setSubtitle(getString(R.string.subtitle_configuring).replace("[[x]]",settingV6 ? "Ipv6" : "Ipv4"));
Utils.requireNonNull(getSupportActionBar()).setSubtitle(getString(R.string.subtitle_configuring).replace("[[x]]",settingV6 ? "Ipv6" : "Ipv4"));
}else if(item.getItemId() == android.R.id.home){
lastBackPress = System.currentTimeMillis();
onBackPressed();
......
package com.frostnerd.dnschanger.util;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
......@@ -15,6 +16,7 @@ import android.graphics.drawable.Icon;
import android.os.Build;
import android.os.Bundle;
import android.service.quicksettings.TileService;
import android.support.annotation.IntRange;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v4.app.Fragment;
......@@ -118,7 +120,7 @@ public final class Util {
public static void updateAppShortcuts(Context context) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N_MR1) {
ShortcutManager shortcutManager = context.getSystemService(ShortcutManager.class);
ShortcutManager shortcutManager = Utils.requireNonNull(context.getSystemService(ShortcutManager.class));
if (!PreferencesAccessor.areAppShortcutsEnabled(context)) {
shortcutManager.removeAllDynamicShortcuts();
return;
......@@ -194,7 +196,7 @@ public final class Util {
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
shortcutIntent.putExtra("servers", serializableToString(servers));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
ShortcutManager shortcutManager = (ShortcutManager) context.getSystemService(Activity.SHORTCUT_SERVICE);
ShortcutManager shortcutManager = Utils.requireNonNull((ShortcutManager) context.getSystemService(Activity.SHORTCUT_SERVICE));
if (shortcutManager.isRequestPinShortcutSupported()) {
ShortcutInfo shortcutInfo = new ShortcutInfo.Builder(context, StringUtil.randomString(30))
.setIcon(Icon.createWithResource(context, R.mipmap.ic_launcher))
......@@ -219,7 +221,7 @@ public final class Util {
public static void startService(Context context, Intent intent){
if(PreferencesAccessor.isEverythingDisabled(context))return;
if(intent.getComponent().getClassName().equals(DNSVpnService.class.getName()) &&
if(intent.getComponent() != null && intent.getComponent().getClassName().equals(DNSVpnService.class.getName()) &&
PreferencesAccessor.isNotificationEnabled(context) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
context.startForegroundService(intent);
}else context.startService(intent);
......@@ -227,12 +229,13 @@ public final class Util {
public static String createNotificationChannel(Context context, boolean allowHiding){
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
NotificationManager notificationManager = Utils.requireNonNull((NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE));
if(allowHiding && PreferencesAccessor.shouldHideNotificationIcon(context)){
NotificationChannel channel = new NotificationChannel("noIconChannel", context.getString(R.string.notification_channel_hiddenicon), NotificationManager.IMPORTANCE_MIN);
NotificationChannel channel = new NotificationChannel("noIconChannel", context.getString(R.string.notification_channel_hiddenicon), NotificationManager.IMPORTANCE_NONE);
channel.enableLights(false);
channel.enableVibration(false);
channel.setDescription(context.getString(R.string.notification_channel_hiddenicon_description));
channel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
notificationManager.createNotificationChannel(channel);
return "noIconChannel";
}else{
......@@ -240,6 +243,7 @@ public final class Util {
channel.enableLights(false);
channel.enableVibration(false);
channel.setDescription(context.getString(R.string.notification_channel_default_description));
channel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
notificationManager.createNotificationChannel(channel);
return "defaultchannel";
}
......@@ -255,7 +259,7 @@ public final class Util {
LogFactory.writeMessage(context, LOG_TAG, "Job is already running/scheduled, not doing anything");
return;
}
JobScheduler scheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
JobScheduler scheduler = Utils.requireNonNull((JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE));
scheduler.schedule(new JobInfo.Builder(0, new ComponentName(context, ConnectivityJobAPI21.class)).setPersisted(true)
.setRequiresCharging(false).setMinimumLatency(0).setOverrideDeadline(0).build());
} else {
......@@ -265,8 +269,8 @@ public final class Util {
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private static boolean isJobRunning(Context context, int jobID){
JobScheduler scheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
private static boolean isJobRunning(Context context, @IntRange(from = 0) int jobID){
JobScheduler scheduler = Utils.requireNonNull((JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE));
for ( JobInfo jobInfo : scheduler.getAllPendingJobs())
if (jobInfo.getId() == jobID) return true;
return false;
......
......@@ -119,7 +119,7 @@ public class DNSTCPProxy extends DNSProxy{
resolver = new DNSResolver(context);
this.vpnService = context;
for(IPPortPair pair: upstreamDNSServers){
if(pair.getAddress() != null && !pair.getAddress().equals(""))this.upstreamServers.put(pair.getAddress(), pair.getPort());
if(pair != IPPortPair.getEmptyPair() && !pair.getAddress().equals(""))this.upstreamServers.put(pair.getAddress(), pair.getPort());
}
this.resolveLocalRules = resolveLocalRules;
this.queryLogging = queryLogging;
......
......@@ -110,7 +110,7 @@ public class DNSUDPProxy extends DNSProxy{
resolver = new DNSResolver(context);
this.vpnService = context;
for(IPPortPair pair: upstreamDNSServers){
if(pair.getAddress() != null && !pair.getAddress().equals(""))this.upstreamServers.put(pair.getAddress(), pair.getPort());
if(pair != IPPortPair.getEmptyPair() && !pair.getAddress().equals(""))this.upstreamServers.put(pair.getAddress(), pair.getPort());
}
this.resolveLocalRules = resolveLocalRules;
this.queryLogging = queryLogging;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment