ndt-dev - [ndt-dev] [ndt] r852 committed - Merged setHostAddress and setsHostName methods
Subject: NDT-DEV email list created
List archive
[ndt-dev] [ndt] r852 committed - Merged setHostAddress and setsHostName methods
Chronological Thread
- From:
- To:
- Subject: [ndt-dev] [ndt] r852 committed - Merged setHostAddress and setsHostName methods
- Date: Mon, 28 Oct 2013 09:11:35 +0000
Revision: 852
Author:
Date: Mon Oct 28 09:11:20 2013 UTC
Log: Merged setHostAddress and setsHostName methods
http://code.google.com/p/ndt/source/detail?r=852
Modified:
/branches/applet_54/Applet/Tcpbw100.java
=======================================
--- /branches/applet_54/Applet/Tcpbw100.java Fri Oct 18 08:04:31 2013 UTC
+++ /branches/applet_54/Applet/Tcpbw100.java Mon Oct 28 09:11:20 2013 UTC
@@ -1156,7 +1156,7 @@
}
// prefer IPv6 checkbox
else if (source == _chkboxPreferIPv6) {
- setHostAddress(sHostName);
+ setsHostName(sHostName);
}
// mail to functionality
else if (source == _buttonMailTo) {
@@ -3891,32 +3891,29 @@
private void setsHostName(String sHostName) {
this.sHostName = sHostName;
- setHostAddress(sHostName);
- }
-
- private void setHostAddress(String sHostName) {
InetAddress[] addresses;
- InetAddress found = null;
+ InetAddress found = null;
- try {
- addresses = InetAddress.getAllByName(sHostName);
+ try {
+ addresses = InetAddress.getAllByName(sHostName);
- if (_chkboxPreferIPv6.isSelected()) {
- for(int k = 0; k < addresses.length; ++k) {
- if (addresses[k] instanceof
Inet6Address) {
- found = addresses[k];
- break;
- }
- }
- }
- } catch (Exception e) {
- throw new IllegalArgumentException(e);
- }
+ if (_chkboxPreferIPv6.isSelected()) {
+ for(int k = 0; k < addresses.length; ++k) {
+ if (addresses[k] instanceof Inet6Address) {
+ found = addresses[k];
+ break;
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new IllegalArgumentException(e);
+ }
- if (null != found) {
- this.hostAddress = found;
- } else if (addresses.length > 0) {
- this.hostAddress = addresses[0];
- }
- }
+ if (null != found) {
+ this.hostAddress = found;
+ } else if (addresses.length > 0) {
+ this.hostAddress = addresses[0];
+ }
+ }
+
} // class: Tcpbw100
- [ndt-dev] [ndt] r852 committed - Merged setHostAddress and setsHostName methods, ndt, 10/28/2013
Archive powered by MHonArc 2.6.16.