I use red5 and setting/getting attributes using the IConnection class, but that’s really not relevant.
‘L’ means long in java. so 0L is 0 type Long instead of just ‘0’ which is 0 type Integer.
What is the difference between [Ljava.lang.Long and java.lang.Long in the following error message:
stack trace: java.lang.ClassCastException: [Ljava.lang.Long; cannot be cast to java.lang.Long
update
code sample:
static Long getLongAttribute(IConnection conn, String attribute) {
Long result=null;
try {
if (!conn.hasAttribute(attribute))
throw new Exception(attribute + " - Long attribute not found!");
result = conn.getLongAttribute(attribute); // <--- ERRROR ON THIS LINE
} catch (Exception e) {
_handleException(e);
}
return result;
}
The first object is array of
Long, the second is justLong. Try thisOutput
But I do agree that
[L_class_;presentation for array types is highly confusing. I wonder how it came to be that way.