Android Java exception even after string null or empty check -
I really do not understand why java.lang.NumberFormatException: illegal long: "zero" is here.
The problem snippet is like follow-up.
try {userid = (JSONObject) msg.obj) .getString ("userid"); If (userid.equals ("") || userid.isEmpty () || null == user id) {onClickLogout (); Return; } And {client.setUserid (Long.Personal (User ID)); }} Grip (JasonXExpress E) {// Todo Auto-Generated Catch Block e.printStackTrace (); OnClickLogout (); Return; } Line Client.SetUsured (Long. Parsleyng (user-facing)); The following exception is received
java.lang.NumberFormatException: invalid length: "tap" at java.lang.Long.invalidLong (long.java:1225) java.lang.Long.parse At (long .java: 362) at java.lang.Long.parseLong (long.java353) at java.lang.Long.parseLong (long.Java 319) at client.setUserid (long-term user ()); The issue is that there is a blank exception even after the user's idle and empty check in the code. what happened with me? Please check it out experts!
string value and no reference empty . If you use "code" in "null" .equals (userid) in the literal null value if Do not check different forms.
Comments
Post a Comment