ClassCastException with afterDescribe() in CBL

We get the following cast exception with the following code.

Android SDK version : Backendless SDK v1.10 for Android, released 08.11.2014.

Business Logic - User Service Handler - afterDescribe() -> cast Exception.

Sample Code :

@Override

public void afterDescribe(RunnerContext context, ExecutionResult<List<UserProperty>> result) throws Exception {

    System.out.println("GenericUserEventHandler.afterDescribe()");

    List<UserProperty> userProperties = result.getResult(); // Exception here

    for(UserProperty userProperty : userProperties) {

        System.out.println("  result=" + userProperty);

    }

}

Exception Log :

GenericUserEventHandler.afterDescribe()

[Lcom.backendless.property.UserProperty; cannot be cast to java.util.List

java.lang.reflect.InvocationTargetException

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at com.backendless.coderunner.runtime.InvocationTask.run(InvocationTask.java:101)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ClassCastException: [Lcom.backendless.property.UserProperty; cannot be cast to java.util.List

    at com.backendless.demo.events.user_service.GenericUserEventHandler.afterDescribe(GenericUserEventHandler.java:90)

    ... 8 more

Hi, Simon.

We will check this issue as soon as possible.
You always work with DigitalCopel application?

Regards, Kate.

Hi,
Actually these Android SDK related problems I am reporting on behalf of one of the engineers in Korea and are not directly related to my Digital Copel application. If you require the app ID I’ll ask him.
Regards,
Simon.

Hi,

You could download last version of code runner and check this issue.
https://backendless.com/backend-as-a-service/downloads/

Note:
in result server will return array instead of list
ExecutionResult<ObjectProperty[]> result

Regards,
Kate.

Thanks Kate, I’ll get the engineer who reported the problem to check this.

Hi,
We’ve confirmed it already fixed on CodeRunnerSDK_1.10 released 11.19.2014.

Regards,
Niro.