Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class Instrumentation breaks when local variable set to null #4

Closed
paulseawa opened this issue Feb 2, 2016 · 4 comments
Closed

Class Instrumentation breaks when local variable set to null #4

paulseawa opened this issue Feb 2, 2016 · 4 comments
Assignees
Labels

Comments

@paulseawa
Copy link

If you initialize a local variable to null, then call an await() within a try catch block, you get ClassNotFoundException on the class in which you did that, during that classes initialization.

Simply by removing the null initialization works around the issue.

  @Async
  public Task<Void> doStuff(Task<Void> otherStuff) {

    String x = null;        //bad
    //String x;             //ok

    try {
      await(otherStuff);
    } catch (Exception e) {
      throw e;
    }
    return Task.done();

  }
@JoeHegarty JoeHegarty added the bug label Feb 2, 2016
@JoeHegarty
Copy link
Member

Thanks for the report. @DanielSperry is going to take a look at this shortly.

@DanielSperry
Copy link
Contributor

I'm on it now.

DanielSperry pushed a commit that referenced this issue Feb 11, 2016
@DanielSperry
Copy link
Contributor

Fixed.
Thanks for reporting this @paulseawa

538968c

The problem would also occur with:

String x = null;
await(task);

and

String x = null;
someMethod(x, await(task));

and

someMethod(null, await(task));

this fix will be in version 1.0.2

DanielSperry added a commit that referenced this issue Feb 12, 2016
@JoeHegarty
Copy link
Member

This is resolved in the 1.0.2 release - https://github.com/electronicarts/ea-async/releases/tag/v1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants