This commit is contained in:
Igor I
2025-03-13 11:16:16 +05:00
parent 1c1c6e56fb
commit 2add158319
5 changed files with 20 additions and 126 deletions

View File

@ -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 {

View File

@ -100,8 +100,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;
}
@ -1019,10 +1018,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);
}
//---------------------------------------------------------------------------