I\'ve spent the past two hours debugging what seems extremely unlikely. I\'ve stripped the method of a secondary Android Activity to exactly this:
public voi
To understand this, some examples:
Long val= Long.getLong("32340");
returns: null
Long val = Long.getLong("32340", 3000);
returns: 3000
Using Long.parseLong() :
Long val = Long.parseLong("32340");
returns: 32340
The documentation describe getLong() method as :
Returns the Long value of the system property identified by string.
this is the code of the getLong() method and only get a property value defined by a string:
public static Long getLong(String string) {
if (string == null || string.length() == 0) {
return null;
}
String prop = System.getProperty(string);
if (prop == null) {
return null;
}
try {
return decode(prop);
} catch (NumberFormatException ex) {
return null;
}
}