Merge branch 'master' of https://git.mesh.kz/igor/Tools_java
This commit is contained in:
@ -494,7 +494,7 @@ public class TCField
|
||||
}else if(type== TCField.BD_UTF8_1 || type== TCField.BD_UTF8_1_UUID || type== TCField.BD_UTF8_1_TIMESTAMP || this.type== TCField.BD_SUINT8 || this.type== TCField.BD_SINT8 || this.type== TCField.BD_SFLOAT8)
|
||||
{
|
||||
value=null;
|
||||
if(val!=null && !val.equals(""))
|
||||
if(val!=null && !val.isEmpty())
|
||||
{
|
||||
byte[] b=null;
|
||||
try {
|
||||
@ -517,7 +517,7 @@ public class TCField
|
||||
}else if(type== TCField.BD_UTF8_2)
|
||||
{
|
||||
value=null;
|
||||
if(val!=null && !val.equals(""))
|
||||
if(val!=null && !val.isEmpty())
|
||||
{
|
||||
byte[] b=null;
|
||||
try {
|
||||
@ -541,7 +541,7 @@ public class TCField
|
||||
}else if(type== TCField.BD_UTF8_4 || type== TCField.BD_UTF8_4_JSONB)
|
||||
{
|
||||
value=null;
|
||||
if(val!=null && !val.equals(""))
|
||||
if(val!=null && !val.isEmpty())
|
||||
{
|
||||
byte[] b=null;
|
||||
try {
|
||||
|
||||
@ -123,8 +123,7 @@ public class Tools {
|
||||
try {
|
||||
InetAddress ipAddr = InetAddress.getByName("google.com");
|
||||
//InetAddress ipAddr = InetAddress.getByName("geovizor.com");
|
||||
//You can replace it with your name
|
||||
return !ipAddr.equals("");
|
||||
return ipAddr.isReachable(5000);
|
||||
} catch (Exception ex) {
|
||||
return false;
|
||||
}
|
||||
@ -1042,10 +1041,10 @@ public class Tools {
|
||||
if((str.charAt(i)=='-' && (val.length()==0 || val.charAt(0)!='-')) || str.charAt(i)=='0' || str.charAt(i)=='1' || str.charAt(i)=='2' || str.charAt(i)=='3' || str.charAt(i)=='4' || str.charAt(i)=='5' || str.charAt(i)=='6' || str.charAt(i)=='7' || str.charAt(i)=='8' || str.charAt(i)=='9')
|
||||
val.append(str.charAt(i));
|
||||
}
|
||||
if(val.toString().equals("")) return 0;
|
||||
if(val.toString().isEmpty()) return 0;
|
||||
return Integer.parseInt(val.toString());
|
||||
}
|
||||
if(str.equals("")) return 0;
|
||||
if(str.isEmpty()) return 0;
|
||||
return Integer.parseInt(str);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user