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;
}
conn.getLongAttributecall. There is no casting in the code presented in the question, but without a full stack trace it's hard to say exactly where the problem is. If there was a type mismatch withresult = conn.getLongAttributethen the compiler would catch it.